Call PDO
in another class
There is a class build class, and PDO is connected. The call is $db
I made an error when calling $db in the build class, prompting that there is a problem with query
I wrote this in the class
$query = $db->query($sql)
Let me answer
Website ideas and solutions
I don’t have a very deep understanding of classes. Please give me some support!
Website ideas and solutions
Just say there was an error. If you don’t post the error code, who knows what went wrong