MySQL Forums
Forum List  »  Connector/Arduino

Re: Reading values from mysql
Posted by: Steve Spence
Date: April 23, 2014 09:47AM

OK, I'll try to clarify my request.

Here is the query I want to run (formatted for php, as that's what I'm familiar with):


$result = mysqli_query($con,"SELECT * FROM jobque ORDER BY jobID ASC LIMIT 1 ");

it will return:

$jobID = $row['jobID'];
$deviceID = $row['deviceID'];
$pinNum = $row['pinNum'];
$pinValue = $row['pinValue'];

If the deviceID doesn't match this unit, I want to ignore, so maybe I should add a where clause so it only pulls a job for this device. I want to set the physical pins equal to pinNum (say D3) to the pinValue (0 for off, 1 for on, or maybe a pwm value.)

I built a pseudo arduino in php that does all this (and more and it work perfectly. just need to migrate functionality to the arduino. Please help.

Options: ReplyQuote


Subject
Views
Written By
Posted
2464
April 17, 2014 05:33PM
Re: Reading values from mysql
1465
April 23, 2014 09:47AM
1704
April 25, 2014 06:52AM
2147
April 26, 2014 12:12PM
1387
April 30, 2014 07:55AM
1436
April 30, 2014 08:08AM
1343
April 30, 2014 05:59PM
1341
May 01, 2014 05:00PM
1246
May 07, 2014 08:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.