|  | Posted by comp.lang.php on 06/18/91 11:42 
Marcin Dobrucki wrote:> comp.lang.php wrote:
 >
 > >
 > > "SELECT id, first_name, last_name, (SELECT count(id) #where#) as
 > > paginate_total, email, address, city, state, zip, phone FROM person
 > > $where "
 > >
 > > You want "#where#" inside the subselect substituted with $where
 >
 >    So basically you are selecting "id, first_name, last_name ..." and
 > count of the returned results?  Why not just ask the DB how many rows it
 > returned?
 >
 >    /marcin
 
 Because the resultset will have, for example, only 20 rows while the
 entire table might have 20,000 rows.  I must show how many total
 records exist, all the while, only display a unit of 20.
 
 Phil
 [Back to original message] |