Shaolin
02-16-2009, 06:58 PM
Hi Guys
I am trying to select a range of results using the LIMIT clause but its does not work. See below:
SELECT *, DATE_FORMAT(last_modified,'%d/%b/%Y') AS formatted_last_modified FROM mail WHERE user_id=1 AND is_draft='1' ORDER BY last_modified DESC LIMIT 50,100;
As you can see, I am requesting all records between 50 and 100, but the query returns ALL the current records which is from record 1 to 59. Does anyone know why this is happening ?
I am trying to select a range of results using the LIMIT clause but its does not work. See below:
SELECT *, DATE_FORMAT(last_modified,'%d/%b/%Y') AS formatted_last_modified FROM mail WHERE user_id=1 AND is_draft='1' ORDER BY last_modified DESC LIMIT 50,100;
As you can see, I am requesting all records between 50 and 100, but the query returns ALL the current records which is from record 1 to 59. Does anyone know why this is happening ?