PDO + where avec un Integer
Bonsoir,
Je ne comprend pourquoi la requête me pose souci :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| if(!empty($_POST['category']))
{
$cat = $_POST['category'];
foreach($cat as $c)
{
extract($c);
$id_type_article = intval($id_type_article);
$type_article_intitule =htmlspecialchars($type_article_intitule);
$sql_update_type_article = $bdd->prepare('UPDATE pevtt_type_article SET type_article_intitule = ?, WHERE id_type_article = ?');
$sql_update_type_article->execute(array($type_article_intitule,$id_type_article));
}
$reporting = 'Les modifications ont bien été prises en compte';
} |
Erreur :
Code:
check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id_type_article = '1''
J'ai essayé avec un BindValue mais le résultat est similaire.
Une idée du pourquoi ?
Merci.