Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I find the number of rows in a table d 1

Status
Not open for further replies.

luckyblackcat

Programmer
Aug 15, 2002
19
GB
Hi, I need to find the total number of rows in a table and then send this number using POST to a Flash movieclip.

Thanks for your time.
 
select count(*) from yourtable; ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Hi Thanks for your help much appreciated.

Your suggestion works on phpMyAdmin.
But in a php script I get "Resource id #2"
returned instead of the number ... any ideas why?


Thanks luckyblackcat
 
$count=@mysql_query("select count(*) from hardware");

$records=mysql_result($count,0);

echo $records; ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Thanks so much, my script now works!!!
your help is much appreciated esp on a Sunday!!

Cheers lbc (Ramsgate)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top