rswildy Posted June 15, 2008 Share Posted June 15, 2008 the query is: $sql = "SELECT * FROM gallery WHERE category = " . $catName . " LIMIT {$limitStart} , {$limit}"; $sqlp = "SELECT * FROM gallery WHERE category = " . $catName . " LIMIT {$limitStartp} , {$limit}"; the error is: 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 'LIMIT 12 , 12' at line 1 Link to comment Share on other sites More sharing options...
Wander Posted June 15, 2008 Share Posted June 15, 2008 the $catName needs to be between singlequotes, (..) category = '{$catName}' LIMIT (..etc..) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.