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 Quote Link to comment 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.... Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
lokie538 Posted May 4, 2008 Author Share Posted May 4, 2008 thanks for all your help everyone Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.