econpy / torque

A set of tools used with the Torque app for Android to store OBD2 data in MySQL, view GPS data from Torque on a map in real time using the Google Maps JavaScript API, plot OBD2 data in time series charts, and export the data to CSV or JSON.
MIT License
285 stars 120 forks source link

plot.php mysql #34

Open chandra50 opened 8 years ago

chandra50 commented 8 years ago

In plot.php I get the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!, FROM raw_logs WHERE sessi' at line 1

// Get data for session
$sessionqry = mysql_query("SELECT time,$v1,$v2
                      FROM $db_table
                      WHERE session=$session_id
                      ORDER BY time DESC;") or die(mysql_error());

mysql version (in Ubuntu 14.04) is mysql Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.3

Looks like this issue has been discussed earlier. Could you please let me know the resolution. Thanks.