Issue with php/mysql prepared insert statement
I might just be too dumb to see it but here is my issue:
$stmt = $mysql->prepare("INSERT INTO projects_files (mid,filename,type) VALUES ('?','?','?')"); $stmt->bind_param('isi',$this->id,$File->filename,$File->type);
Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement
I have checked that all vars are assigned and have a value and the datatypes are all right.
Thanks in advance for help
Don't put the question marks in quotes. The database will quote everything appropriately.
') around the question mark(