How about something like this:
SELECT title FROM news WHERE cond1 LIMIT 1, 10
union
SELECT count(title) from NEWS WHERE cond1 LIMIT 1, 10
-----Original Message-----
From: nsabbi [mailto:[EMAIL PROTECTED]]
Sent: Tue, 03 July 2001 09:48
To: [EMAIL PROTECTED]
Subject: selecting with LIMIT and including the total?
Hi, how to query a list of records limiting the score, but including the
TOTAL of records satisfying the condition, all in one statement?
i.e.
SELECT title FROM news WHERE cond1 LIMIT 1, 10
plus
SELECT count(*) from NEWS WHERE cond1
all in one.
Thanks in advance
Nico
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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