haibec Posted January 5, 2008 Share Posted January 5, 2008 Please help me.When i change DB from MySQL to SQL2000 . My Website (by PHP) code <?$rowsPerPage = 9; // how many rows to show per page$pageNum = 1; // by default we show first page$offset = ($pageNum - 1) * $rowsPerPage; // counting the offset$sql = "SELECT id, name, logo FROM company WHERE accept=3 ORDER BY id DESC LIMIT $offset, $rowsPerPage";$result = mssql_query($sql, $link);for ($i=1;$i<=9;$i++){ if (($i%3) == 1) echo "<tr>";if ($row=mssql_fetch_array($result)){?>When im runing appear error:Warning: mssql_query() [function.mssql-query]: message: Line 1: Incorrect syntax near 'LIMIT'. (severity 15) in C:\AppServ\www\project\modules\category.php on line 66Please help me solution for this error Link to comment Share on other sites More sharing options...
jhecht Posted January 5, 2008 Share Posted January 5, 2008 you should change back to MySQL. Problem solved ;p Link to comment Share on other sites More sharing options...
Synook Posted January 5, 2008 Share Posted January 5, 2008 Jeht welcome back Link to comment Share on other sites More sharing options...
justsomeguy Posted January 8, 2008 Share Posted January 8, 2008 MS SQL Server 2000 does not support LIMIT. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.