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
3832
April 17, 2014 05:33PM
Re: Reading values from mysql
2417
April 23, 2014 09:47AM
3274
April 25, 2014 06:52AM
3192
April 26, 2014 12:12PM
2260
April 30, 2014 07:55AM
2232
April 30, 2014 08:08AM
2195
April 30, 2014 05:59PM
2096
May 01, 2014 05:00PM
2014
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.