(Sorry, if necessary, my first question is about stack overflow. I will be happy to change it if anyone has suggestions. I have been looking for an answer, but I'm afraid that my understanding of the terminology is not enough to do a full search.)
I'm used to using mysql_fetch_array to get records from a database. When retrieving records this way mysql_num_rows gives me the number of rows. However, in my current project, I am using mysql_fetch_object. mysql_num_rows does not seem to work with this function, and when I do a โcountโ based on the query results, I get the expected response: 1 (one object).
Is there a way to โseeโ an object and count the elements inside it?
oop php mysql mysql-num-rows
David rhoden
source share