我有一个在 phpmyadmin 中有效但在 php ( mysqli
)上无效的查询
问题出在哪里 ?
询问:
INSERT INTO `SepidarSoft_Portal`.`Archive_Media` SET `CTime`='1364135670',`UTime`='1364135670',`PID`='',`State`='1',`Sequence`='0',`Subject`='Hojom Marg ( www.Parstafrih.ir )',`Text`='',`Description`='',`Definition`='',`KeyWord`='',`ETag`='',`Access`='',`LinkToPage`='',`Attachment`='[{\"Name\":null,\"Kind\":null,\"Size\":false,\"Address\":\"27\",\"More\":{\"Original\":1}}]',`STime`='0',`ETime`='0';
SET @LAST_ID:=LAST_INSERT_ID();
INSERT INTO `SepidarSoft_Portal`.`Archive_Media_MoreInfo` (`id`,`Key`,`Value`) VALUES (@LAST_ID,'Instrumental','1'),(@LAST_ID,'KindFile','صوتی'),(@LAST_ID,'Genre','نغمه'),(@LAST_ID,'SName','Amir Tajik ( www.Parstafrih.ir )'),(@LAST_ID,'Events','[[\"\"]]'),(@LAST_ID,'Album','( www.Parstafrih.ir )'),(@LAST_ID,'Composer',''),(@LAST_ID,'Adjustment',''),(@LAST_ID,'Subtitle','[object HTMLInputElement]'),(@LAST_ID,'Release','');
错误:
#1064 -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 'SET @LAST_ID:=LAST_INSERT_ID();
mysqli_multi_query
1)我为此使用php