Re: [PHP] Re: NMax

2004-11-07 Thread M. Sokolewicz
tion. Nate -Original Message- From: David Schlotfeldt [mailto:[EMAIL PROTECTED] Sent: Saturday, November 06, 2004 9:19 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: NMax You could do it in a SQL statement SELECT COUNT(*) FROM table_name; This is less system intensive. David John Taylor-Johnsto

RE: [PHP] Re: NMax

2004-11-06 Thread nate
Yeah definitely use COUNT(*) or mysql_num_rows() function. Nate -Original Message- From: David Schlotfeldt [mailto:[EMAIL PROTECTED] Sent: Saturday, November 06, 2004 9:19 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: NMax You could do it in a SQL statement SELECT COUNT(*) FROM

[PHP] Re: NMax

2004-11-06 Thread David Schlotfeldt
You could do it in a SQL statement SELECT COUNT(*) FROM table_name; This is less system intensive. David John Taylor-Johnston wrote: I might add, I do this, think there must be a better way? $mycounter = 0; while ($mydata = mysql_fetch_object($news)) { $mycounter++; } John Taylor-Johnston wro

[PHP] Re: NMax

2004-11-06 Thread John Taylor-Johnston
I might add, I do this, think there must be a better way? $mycounter = 0; while ($mydata = mysql_fetch_object($news)) { $mycounter++; } John Taylor-Johnston wrote: > How can I calculate how many records I have in a table? > John -- PHP General Mailing List (http://www.php.net/) To unsubs