Jump to content

mysqli bind_param


fou2enve

Recommended Posts

$stmt = $dbconn->prepare("SELECT * FROM `?_table` WHERE `name`='?'");
$stmt->bind_param('ss', $city, $name);

 

Fatal error: Call to a member function bind_param() on a non-object in C:\htdocs\beta\process.php on line 122

 

ive run the query in phpmyadmin and it works without errors, ive read online that if the query fails then $stmt becomes null and then bind_param fails. but the variables are valid when i echo them, so im lost.

 

any ideas?

 

Link to comment
https://forums.phpfreaks.com/topic/98681-mysqli-bind_param/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.