php - Number of variables doesn't match number of parameters in prepared statements -


$sql = "select table_name information_schema.tables table_schema = '?'"; $stmt = $db->prepare($sql); $stmt->bind_param("s", $database); $stmt->execute(); $resultset = $stmt->get_result(); 

it says "warning: mysqli_stmt::bind_param(): number of variables doesn't match number of parameters in prepared statement in..."

can explain what's wrong? $database string.

if use ? placeholder, don't use ticks ' s

$sql = "select table_name information_schema.tables table_schema = ?"; $stmt = $db->prepare($sql); $stmt->bind_param('s', $database); $stmt->execute(); $resultset = $stmt->get_result(); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -