<?php doquery("INSERT INTO {{table}} SET primary='$attrib',quality='$jak',material='$mat',kind='$typ',owner='".$userrow["id"]."',secondary='X'" , "equipment"); ?>
daje mi efekt:
Kod
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'primary='1173',quality='9',material='9',kind='9',owner='1',secondary='X'' at line 1
a żeby było śmieszniej
<?php doquery("INSERT INTO {{table}} SET quality='$jak',material='$mat',kind='$typ',owner='".$userrow["id"]."',secondary='X'" , "equipment"); ?>
działa (usunąłem tylko primary='$attrib',).
i trzecie podejście:
<?php $attrib = 1; doquery("INSERT INTO {{table}} SET primary='$attrib',quality='$jak',material='$mat',kind='$typ',owner='".$userrow["id"]."',secondary='X'" , "equipment"); ?>
też nie przynosi oczekiwanych rezultatów:
Kod
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'primary='1',quality='9',material='10',kind='14',owner='1',secondary='X'' at line 1
I na tym moje pomysły się kończą, można prosić o radę jak naprawić zapytanie? wszystkie kolumny tabeli są UNSIGNED mediumintint(15).