Help with querying MySQL database


(Chris Hardy) #21

I’m planing to use it to inform people of the last used site on the body where insulin was administered to make sure they choose a different site the next time. This is why I need data from a data base to be displayed. I’ve already created a system to send the information to the database so this should help complete the next steps of the idea development. Long way to go though!


(Chris Hardy) #22

Thanks @DBear I’ll look further into this :slight_smile:


(Chris Hardy) #23

Hi @strmiska

I’ve managed to get your example working perfectly. I was just wondering if you had managed to get more than one row of data to be received from the database to display in hype?

for example using the PHP:

$sql="SELECT * FROM $tableName WHERE id = 3 AND id = 2";


(strmiska) #24

isn´t it possible using this?

$sql = "SELECT * FROM $tableName";

then you have to create a table in innerHTML of an rectangle to display the whole sql
EDIT: if you want specifical rows only - this example i never tried, sorry.
for this i´ve to test, but haven´t time yet


(Chris Hardy) #25

Ideally I need to each part of the data to be in its own innerHTML so I can use it in hype to trigger other javascript events


(strmiska) #26

that´s tricky, but for this i´m not the right person. i´ve to make tests, but time is missing at this moment


(Chris Hardy) #27

No problem and thanks for your help. I’m currently exploring if MySQL can send only the data that I need as well but I’m not sure how it all works just yet.


(strmiska) #28

@DBear is genius in this - he helped me out a lot :sunglasses:
maby he can help you , too