[PHP] Number of rows reurned?

2002-01-20 Thread Daniel Alsén

Hi,

how can i get the number of rows reuturned by this query?

$sql = select date from statistik where shooter='$shooter_login' group by
date;

I want to add a page function and limit the returned rows on each page - but
i can´t get the total number of rows.

Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   | +46 8 694 82 22  #
# PGP: http://www.mindbash.com/pgp/  #


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Number of rows reurned?

2002-01-20 Thread Jason Wong

On Monday 21 January 2002 01:45, Daniel Alsén wrote:
 Hi,

 how can i get the number of rows reuturned by this query?

 $sql = select date from statistik where shooter='$shooter_login' group by
 date;

 I want to add a page function and limit the returned rows on each page -
 but i can´t get the total number of rows.

Check out the relevant chapter in the manual for the db that you're using. 
Some dbs have a function returning the number of rows. 

If you're using MySQL then mysql_num_rows() is what you want.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
If a man has talent and cannot use it, he has failed.
-- Thomas Wolfe
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: [PHP] Number of rows reurned?

2002-01-20 Thread Daniel Alsén

Thanks. I knew that - really. Meltdown upstairs :)

- D

 -Ursprungligt meddelande-
 Från: Jason Wong [mailto:[EMAIL PROTECTED]]
 Skickat: den 20 januari 2002 18:53
 Till: Daniel Alsén; PHP List
 Ämne: Re: [PHP] Number of rows reurned?


 On Monday 21 January 2002 01:45, Daniel Alsén wrote:
  Hi,
 
  how can i get the number of rows reuturned by this query?
 
  $sql = select date from statistik where
 shooter='$shooter_login' group by
  date;
 
  I want to add a page function and limit the returned rows on each page -
  but i can´t get the total number of rows.

 Check out the relevant chapter in the manual for the db that
 you're using.
 Some dbs have a function returning the number of rows.

 If you're using MySQL then mysql_num_rows() is what you want.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk

 /*
 If a man has talent and cannot use it, he has failed.
   -- Thomas Wolfe
 */

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]