I have a table where two entries has id = 10
. My SQL update query looks like this:
$q = "UPDATE `table_name` SET `col_name` = 'value' WHERE `id` = ?";
if($con-prepare($q)){
$stmt->bind_param("i","10");
$stmt->execute;
$stmt->fetch;
$stmt->close();
}
The query will not run, where is the error in it? And also, when it does run, will it update ALL entries where id = 10
or just the first one?