Forums

This topic is locked

Mysql Limiting records

Posted 17 Jul 2003 19:16:11
1
has voted
17 Jul 2003 19:16:11 Saeed Abdi posted:
Have a page that lists all of the articles in the db (Archive), it shows 10 records and people can cycle through the pages, the page does what I need now, but I would very much like to remove the latest articles as they are always shown on the front page, my problem begins when I use "LIMIT" in my query(LIMT 4,10) if I use the test within the query builder it returns perfect results, but as soon as I click OK and I test the page I get this error " You have an error in your SQL syntax near 'LIMIT 0, 10' at line 1"

As I understand MX uses $maxRows_rs_name for limiting how many records it displays and I think this is interfering with the out put, of the modified query as it now has two LIMIT in the script so I modified the above variable so it reads $maxRows_rs_name = ('4, 8'); but I only get for records instead of 8 records that start from after the last 4 added records


Any help is appreciated <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle><img src=../images/dmxzone/forum/icon_smile_question.gif border=0 align=middle>

Query:
SELECT * FROM indepth
ORDER BY SubDate DESC LIMIT 4, 8

Additional info:
Dreamweaver MX, PHP, MYsql, Win2000, IIS5

Reply to this topic