sql - PHP $stmt->bind_param() Number of variables doesn't match -
for unknown reason code doesn't seem working. have checked on google, no 1 else seems have same problem. bug php?
the error get:
warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: number of variables doesn't match number of parameters in prepared statement in /home/a9684274/public_html/system/db.php on line 102
the code:
$stmt = $mysqli->prepare("select * users username='?'") $name = "vilsol"; $stmt->bind_param("s", $name);
thanks in advance!
remove single quotes '
:
$stmt = $mysqli->prepare("select * users username=?")
in code interpreted string value , not parametrizable value.
Comments
Post a Comment