0
I want to make a loop to show the results of a database query, and get the number of results found in the query. I’m using the cakephp. Does it have any function that does the same thing as the mysqli_num_rows?
0
I want to make a loop to show the results of a database query, and get the number of results found in the query. I’m using the cakephp. Does it have any function that does the same thing as the mysqli_num_rows?
1
Try using the "Count()" of the Resultset object
Hello old7, this link may provide an answer to question but one day it may come to go offline, or the address change, and so the answer will be useless. The best would be for you to post the procedure here.
Basically it is to call the Count method in the query result: $result->Count(); The link refers to the Cake PHP documentation
Browser other questions tagged cakephp query
You are not signed in. Login or sign up in order to post.
This question has an answer accepted and confirmed in the question How to count how many lines a database query has returned (Cake PHP)?.
– Gustavo Cinque