0
Can you tell me why this happens "Trying to get property 'num_rows' of non-object " in php?
5 Respuestas
+ 2
See through it, that the thing from where you refer the property from, is a valid object.
Share your code for a review, it helps to analyse the problem with a code at presence. If you didn't know how to share links, then just follow the below guide 👇
https://www.sololearn.com/post/75089/?ref=app
+ 1
https://code.sololearn.com/w2cpughBHiBL/?ref=app
+ 1
Ipang Thanks you!!
0
Beast,
Check whether the object returned by mysqli_query is a valid object before continuing with other operations (including access to number of rows returned).
The examples in w3schools shows us how it is done 👇
https://www.w3schools.com/PHP/func_mysqli_query.asp
P.S. Avoid mixing up use of procedural & object oriented for mysqli 👍