Jump to content

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 '' at line 1


rootKID

Recommended Posts

this is my code:

$menu_res = sql_query("SELECT * FROM menu WHERE menu_accessible = '".sqlesc("yes")."' AND menu_u_class_read_min <= ".$CURUSER['u_FK_uc_id']); // BETA

and 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 '' at line 1

 

Any help Oo?... tried with and without '' and sql-escape, with and without.. same error i get... ideas Oo?..

 

Thanks if possible! :)

Link to comment
Share on other sites

Print out the value of the string you're using as an SQL query to see what it says.

echo "SELECT * FROM menu WHERE menu_accessible = '".sqlesc("yes")."' AND menu_u_class_read_min <= ".$CURUSER['u_FK_uc_id'];exit; // End program so we can read what was printed
Link to comment
Share on other sites

ok... found the error.. i seriously need to get my eyes fixed x)...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...