----- Original Message ----- From: "mos" <[EMAIL PROTECTED]>
> I have a Where clause like: > select count(*) from table where .... LIMIT 100 > > Unfortunately the Count(*) ignores the LIMIT clause entirely. Why? You could use least(). mysql> select least(count(*),30) from ct; +--------------------+ | least(count(*),30) | +--------------------+ | 30 | +--------------------+ 1 row in set (0.00 sec) mysql> select count(*) from ct; +----------+ | count(*) | +----------+ | 43 | +----------+ 1 row in set (0.00 sec) Cheers, Ryan Fox, Geek email: [EMAIL PROTECTED] BackWatcher, Inc. web: http://backwatcher.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php