jarv
07-19-2008, 08:50 PM
my error message reads:
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 'Green' at line 1
SQL: SELECT * FROM Pubs WHERE rsTown=Bethnal Green
$r_name = $_GET['spubs'];
$offset = ($pageNum - 1) * $rowsPerPage;
$query = "SELECT * FROM pubs WHERE rsPubname LIKE '%".$r_name."%' ORDER BY rsPubname Asc LIMIT $offset, $rowsPerPage";
$result = mysql_query($query) or die(mysql_error().'<br>SQL: ' . $query);
can someone please help me here?
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 'Green' at line 1
SQL: SELECT * FROM Pubs WHERE rsTown=Bethnal Green
$r_name = $_GET['spubs'];
$offset = ($pageNum - 1) * $rowsPerPage;
$query = "SELECT * FROM pubs WHERE rsPubname LIKE '%".$r_name."%' ORDER BY rsPubname Asc LIMIT $offset, $rowsPerPage";
$result = mysql_query($query) or die(mysql_error().'<br>SQL: ' . $query);
can someone please help me here?