Unexpected SQL error
-
Hi,
On my activate plugin action action i creat a table:
$sql = 'CREATE TABLE '.$cat_tab.'(id int primary key AUTO_INCREMENT, CATID text, PARENT text, NAME text)';
And when i’m trying to add data on it :
$sql = "INSERT INTO ".$table_name." ( CATID, PARENT, NAME ) VALUES ('".$id.", ".$parent.", ".$cat_name."')";
It says:
Erreur de la base de données WordPress : [Column count doesn’t match value count at row 1]
INSERT INTO XX_XXXXXXX_XX ( CATID, PARENT, NAME ) VALUES (’43, 4, MATERIEL INFORMATIQUE ‘)Same thing if i remove the autoincrement ID, i don’t get it ..
Anyone know something about this issue ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Unexpected SQL error’ is closed to new replies.