Click to See Complete Forum and Search --> : Query LIMIT attribute in ASP


turb
04-20-2005, 08:35 AM
Hi all,

Is there a way to limit query output result like in php ( ... WHERE field = x LIMIT 0,10 ) ???

I've try it but doesn't seem to work. I search a bit and found SELECT TOP 10 ... it's cool but how if I want the rows 10 to 20 in the access db ???

Thank alot for the help!

turb

phpnovice
04-20-2005, 09:41 AM
In the case of PHP, I think you're using a MySQL database. I know that LIMIT clause is part of the SQL syntax for MySQL. For ASP, if you are using a MySQL database, then you will have the same syntax supported. For SQL Server databases and Access databases, you'll have to check the SQL syntax they support to see if you can find the equivalent.

turb
04-20-2005, 10:10 AM
it's for Access

phpnovice
04-20-2005, 06:47 PM
I just checked and it looks like you're stuck with TOP.

SQL Select syntax (http://msdn.microsoft.com/library/en-us/office97/html/output/F1/D2/S5A334.asp)
All, Distinct, DistinctRow, and Top predicates (http://msdn.microsoft.com/library/en-us/office97/html/output/F1/D2/S5A319.asp)