I need help with a simple MySQL insert query. I have the following code:
INSERT INTO reads (location, meter, value) VALUES ('$_GET[location]', '$meter', '$value')
Which, after PHP, translates into:
INSERT INTO reads (`location`, `meter`, `value`) VALUES ('1234','1111','2505')
This query returns 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 'reads (
location
,meter
,value
) VALUES ('1234','1111','2505')' at line 1
I have gone over my syntax many times and just cant figure out what is wrong with my query. Can anyone spot it?