lokie538 Posted April 27, 2008 Share Posted April 27, 2008 Hi, Is there a way to tell he number of rows in a result from a query?? Something like $num=mysql_numrows($result); but a sqli one?? i dunno im newish to mysql and php. Thanks in advance, lokie538 Link to comment https://forums.phpfreaks.com/topic/103114-solved-number-of-rows-in-a-query/ Share on other sites More sharing options...
GingerRobot Posted April 27, 2008 Share Posted April 27, 2008 So you need a row count using mysqli ? I believe you have to use the SQL COUNT() function: SELECT COUNT(*) FROM tbl WHERE.... Link to comment https://forums.phpfreaks.com/topic/103114-solved-number-of-rows-in-a-query/#findComment-528198 Share on other sites More sharing options...
PFMaBiSmAd Posted April 27, 2008 Share Posted April 27, 2008 No matter how new you are to something, the programming manual exists for a reason. If you bother to look at the mysqli commands in the php manual you will find that there is a function that does what you ask. Link to comment https://forums.phpfreaks.com/topic/103114-solved-number-of-rows-in-a-query/#findComment-528231 Share on other sites More sharing options...
lokie538 Posted May 4, 2008 Author Share Posted May 4, 2008 thanks for all your help everyone Link to comment https://forums.phpfreaks.com/topic/103114-solved-number-of-rows-in-a-query/#findComment-532616 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.