Jump to content

[SOLVED] INCORRECT SQL


PC Nerd

Recommended Posts

hi guys

 

im having trouble with the following SQL, the error i receive is:

 

Query died: 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 '=< 20 ORDER BY Rank, User_Name' at line 1

 

CODE

 

$lower_page_num = $start_page * 20;
$higher_page_num = ($start_page + 1) * 20;

$curr_page_SQL = "SELECT User_Name, Points, Rank, Resource_1 FROM General_Stats WHERE Rank >= ".$lower_page_num." AND =< ".$higher_page_num." ORDER BY Rank, User_Name";


$curr_page_query = mysqli_query($DB_Server, $curr_page_SQL) or die("Query died: ".mysqli_error($DB_Server));

 

thanks for any help

 

PC Nerd

Link to comment
https://forums.phpfreaks.com/topic/37023-solved-incorrect-sql/
Share on other sites

still the error:

 

Query died: 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 '<= 20 ORDER BY Rank, User_Name' at line 1

 

thanx anywayz, anything else i should try

Link to comment
https://forums.phpfreaks.com/topic/37023-solved-incorrect-sql/#findComment-176743
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.