View Full Version : Syntax error help

10-13-2010, 12:53 PM
I am having a problem with a syntax error for a facebook application I'm trying to install.

Invalid query -- SELECT * FROM `results` WHERE `resultLow`<= AND `resultHigh`>= -- 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 'AND `resultHigh`>=' at line 1

I'm just learning programming and I can't figure out how to fix this.

I can send all the code, and I'm sure it will take someone who knows what they are doing 5 minutes to fix.

Can anyone help me

10-14-2010, 01:22 AM
WHERE `resultLow`<=
there are no values mentioned here
select * from results where `resultHigh` <= 2;

10-15-2010, 03:08 PM
I wouldn't use back ticks

Its not wrong but can lead to debug issues later on.

It allows you to name your columns anything you want to. You could have a column called DROP or SELECT and then in your SQL you would use back ticks to reference them


A right hornets nest