phat_hip_prog Posted July 20, 2007 Share Posted July 20, 2007 Hi, I'm wanting to count the number of rows in a table but without having to execute a query first... i.e. to cut down on data transfered... At the moment it's lucky that the table in question has an 'id' field which is small, but when there's thousands of entries, this will still be large. Sorry this does it: $s = "SELECT COUNT(*) as num FROM ".$tn.""; Link to comment https://forums.phpfreaks.com/topic/60966-solved-another-way-mysql_num_rows/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.