Forum Moderators: open

Message Too Old, No Replies

LIMIT 500, 1500 returns 1500 results?

How does that work... confused here

         

designaweb

7:24 am on Mar 18, 2006 (gmt 0)

10+ Year Member



Hi!

The following query:

SELECT * FROM session_data WHERE 1 AND session_data LIKE '%ProcessTime%' LIMIT 1000, 1500

returns 1500 results according to mysql_num_rows();

How is this possible? Isn't that what limit is used for? This way my mysql client runs out of memory :(

designaweb

7:33 am on Mar 18, 2006 (gmt 0)

10+ Year Member



Doh!

First is offset, second is # of results... Shame on me :S

It should be

SELECT * FROM session_data WHERE 1 AND session_data LIKE '%ProcessTime%' LIMIT 1000, 500

in order to return 500 rows... DOH!

Gee... Thanks for answering this one mate :S