scampbell70 Posted February 16, 2015 Report 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.
falkencreative Posted February 16, 2015 Report Posted February 16, 2015 Take a look at the first example here: http://php.net/manual/en/mysqli-result.num-rows.php
scampbell70 Posted February 17, 2015 Author Report Posted February 17, 2015 That worked thank you so much!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now