Re: [PHP] odd results inquiry

2002-12-26 Thread Michael J. Pawlowsky

Well the second one I can help you with.. it should be LIMIT 11,10 if you only want 10 
rows You are asking for 20.
For the fun of it try 1,10 on the first one.



*** REPLY SEPARATOR  ***

On 26/12/2002 at 10:23 PM Tony Tzankoff wrote:

Here is a strange one (for me, anyway)...

The command is as follows:
select * from xtable where client='name' order by r_date desc, r_time desc
limit 0,10;

The problem: It returns 20 records

and when i execute this command...it returns 30 records
select * from xtable where client='name' order by r_date desc, r_time desc
limit 11,20;

and so on.

What the heck is going on here? any ideas? im confoosed!

--

Tony Tzankoff
http://www.tzankoff.com
=




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] odd results inquiry

2002-12-26 Thread Michael J. Pawlowsky

Actually I bet if you take a closer look at your code you will see that your are 
incrementing
that value somewhere before the query is executed or something.
Perhaps you are mixing up the order of the row limit and starting point.
The 0 is right.

I just quickly tried it in a mysql term

SELECT id, pid from tree limit 0,3;
SELECT id, pid from tree limit 3,3;
SELECT id, pid from tree limit 6,3;



*** REPLY SEPARATOR  ***

On 26/12/2002 at 10:32 PM Michael J. Pawlowsky wrote:

Well the second one I can help you with.. it should be LIMIT 11,10 if you
only want 10 rows You are asking for 20.
For the fun of it try 1,10 on the first one.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php