I use the function to provide a database connection function, most of the situation is allowed to normal, but recently the following error prompt:
Fatal Error:call to a member function query () on a non-object in h:\w ..., sometimes refreshing under the good, it is strange, who knows why?
Reply to discussion (solution)
This is a Mysqli object that does not exist. Determine if the Mysqli object is valid before calling query
The reason for this error is that the object of your object does not exist, just a name.
Sometimes the refresh under the good, is not possible, just after the refresh is not executed to the problematic code
The error message comes with the file name and line number at the time of the error, and you can find the problem based on them.
The reason for this error is that the object of your object does not exist, just a name.
Sometimes the refresh under the good, is not possible, just after the refresh is not executed to the problematic code
The error message comes with the file name and line number at the time of the error, and you can find the problem based on them.
I also think it is impossible, clearly the context provides a connection function, the study of a half-day did not complete the why. If the number of queries is small, such as less than 100, if you query thousands of, this problem occurs. Before I can tell, it's just a ghost.
It's going to see your code.
Maybe when you're working with the query results, you happen to overwrite the variable with the same name.
The original is a 10048 error, is my database connection problem.