A voir également:
- QUERY FAILED .You have an error in your SQL syntax; check the manual that corres
- You have an error in your sql syntax check the manual that corresponds to your mysql server version ✓ - Forum - MySQL
- #1064 - You have an error in your SQL syntax ✓ - Forum - MySQL
- You have an error in your SQL syntax ..... ✓ - Forum - Webmaster
- INSERT: You have an error in your SQL syntax ✓ - Forum - Webmaster
- You have an error in your SQL syntax ✓ - Forum - Webmaster
5 réponses
yg_be
- Messages postés
- 14525
- Date d'inscription
- lundi 9 juin 2008
- Statut
- Contributeur
- Dernière intervention
- 8 mars 2021
bonjour,
affiche (echo) la valeur de ta variable $query.
ensuite, utilise-la hors php, par exemple dans phpmyadmin.
si tu ne comprends pas le soucis, partage ici ce que contient cette variable.
affiche (echo) la valeur de ta variable $query.
ensuite, utilise-la hors php, par exemple dans phpmyadmin.
si tu ne comprends pas le soucis, partage ici ce que contient cette variable.
mm
Voici ce qu'il affiche avec echo.
INSERT INTO posts (post_category_id, post_title, post_user, post_date, post_image, post_content, post_tags, post_status) VALUES(,'','',now(),'','','','') QUERY FAILED .
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''','',now(),'','','','')' at line 1
INSERT INTO posts (post_category_id, post_title, post_user, post_date, post_image, post_content, post_tags, post_status) VALUES(,'','',now(),'','','','') QUERY FAILED .
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''','',now(),'','','','')' at line 1
Mm
Il manque la valeur post_ category_id, il ne l’a pris en compte alors que je l’ai bien défini .
$post_category_id = escape($_POST['post_category']);
$post_category_id = escape($_POST['post_category']);