Sunday 26 November 2017

php - Mysqli bind param – number of variables doesn't match number of parameters

I can't understand why I get the error: "Number of
variables doesn't match number of parameters in prepared
statement".



My code looks like
this:



$DB['con'] = new
mysqli($$DB['host'],$DB['user'],$DB['pass'],$DB['base']);

$stmt=$DB['con']->prepare("insert
into
points(iduser,puncte,nume,email,telefon,ultimulpost)values('?',?,'?','?','?',(SELECT
CURDATE()))");

$stmt->bind_param('sisss',$idm,$mynumber,$nume,$email,$tel);
$stmt->execute();

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...