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();
1)これにはphpを使用mysqli_multi_query
します