Hi everyone I’m working on a room booking system and seem to be returning an error.
$sql = "SELECT * FROM `rooms` WHERE capacity => '$minCap' AND capacity <= '$maxCap'";
This is the error I’m getting:
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 ‘=> ‘150’ AND capacity <= ‘220” at line 1
It should be:
Note
>=, not=>.See also: http://www.sql-tutorial.net/SQL-WHERE.asp