MySQL Forums :: Connector/Arduino :: Reading values from mysql


Advanced Search

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
Reading values from mysql 2382 Steve Spence 04/17/2014 05:33PM
Re: Reading values from mysql 1419 Steve Spence 04/23/2014 09:47AM
Re: Reading values from mysql 1647 Charles Bell 04/25/2014 06:52AM
Re: Reading values from mysql 2082 Steve Spence 04/26/2014 12:12PM
Re: Reading values from mysql 1339 Charles Bell 04/30/2014 07:55AM
Re: Reading values from mysql 1365 Steve Spence 04/30/2014 08:08AM
Re: Reading values from mysql 1304 Steve Spence 04/30/2014 05:59PM
Re: Reading values from mysql 1300 Steve Spence 05/01/2014 05:00PM
Re: Reading values from mysql 1212 Charles Bell 05/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.