scampbell70 Posted February 16, 2015 Report Share Posted February 16, 2015 I am using the code from Basic PHP System: View, Edit, Add, Delete records with MySQLi and I am wanting to add some code that will display a total number of results returned from a query. if ($result = $mysqli->query("SELECT * FROM clients where (`clients`.`aftercare` = 'yes')ORDER BY LastName ASC")) My question is how can I display how many records are returned. So for example I run it and it returned 40 names. I would like to add something to the page that says 40 people found. I am sure this is probably very simple, but I am brand new to all of this. Thank you for you help in advance. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 16, 2015 Report Share Posted February 16, 2015 Take a look at the first example here: http://php.net/manual/en/mysqli-result.num-rows.php Quote Link to comment Share on other sites More sharing options...
scampbell70 Posted February 17, 2015 Author Report Share Posted February 17, 2015 That worked thank you so much! 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.
Note: Your post will require moderator approval before it will be visible.