One question, i trying to import one line of data in one my table ( personal_message) well going on SQL windo in my DB and launching the line:
INSERT INTO `personal_messages` (`id_pm`, `id_pm_head`, `id_member_from`, `deleted_by_sender`, `from_name`, `msgtime`, `subject`, `body`) VALUES
(2450, 2450, 158, 1, 'ciccio69', 1220896345, 'BEIJING 2008 OLYMPICS GAME - Informazioni sul prod', 'Ciao edi volevo delle informazioni in più.<br />Grazie<br />Possibile in megaupload?'),
Return me back this error:
QuoteError
query SQL:
INSERT INTO `personal_messages` ( `id_pm` , `id_pm_head` , `id_member_from` , `deleted_by_sender` , `from_name` , `msgtime` , `subject` , `body` )
VALUES ( 2450, 2450, 158, 1, 'ciccio69', 1220896345, 'BEIJING 2008 OLYMPICS GAME - Informazioni sul prod', 'Ciao edi volevo delle informazioni in più.<br />Grazie<br />Possibile in megaupload?' ) ,
Messaggio di MySQL: Documentazione
#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 '' at line 2
why this error? line that i awant insert i took directly esporting from DB 5 minutes before to add, i wanted only try to see if import/export work, but i cannot understand where is the mistake
some solution?
Try getting rid of the ` marks around the table names - sometimes that can cause the error you're getting.
Quote from: Oldiesmann on September 11, 2008, 08:52:35 PM
Try getting rid of the ` marks around the table names - sometimes that can cause the error you're getting.
I trying in this way:
INSERT INTO personal_messages ( id_pm , id_pm_head , id_member_from , deleted_by_sender , from_name , msgtime , subject , body )
VALUES ( 2450, 2450, 158, 1, 'ciccio69', 1220896345, 'BEIJING 2008 OLYMPICS GAME - Informazioni sul prod', 'Ciao edi volevo delle informazioni in più.<br />Grazie<br />Possibile in megaupload?' ) ,
but i have the same error :( very strange.... some more solution?
that line i took directly from backup, i cannot understand this my DB save in that way but cannot resotre using same data?
Try using double quotes instead of single quotes.
INSERT INTO personal_messages ( id_pm , id_pm_head , id_member_from , deleted_by_sender , from_name , msgtime , subject , body )
VALUES ( 2450, 2450, 158, 1, "ciccio69", 1220896345, "BEIJING 2008 OLYMPICS GAME - Informazioni sul prod", "Ciao edi volevo delle informazioni in più.<br />Grazie<br />Possibile in megaupload?" ) ,
Quote from: Rumbaar on October 02, 2008, 11:42:47 PM
Try using double quotes instead of single quotes.
INSERT INTO personal_messages ( id_pm , id_pm_head , id_member_from , deleted_by_sender , from_name , msgtime , subject , body )
VALUES ( 2450, 2450, 158, 1, "ciccio69", 1220896345, "BEIJING 2008 OLYMPICS GAME - Informazioni sul prod", "Ciao edi volevo delle informazioni in più.<br />Grazie<br />Possibile in megaupload?" ) ,
Donw but... same error :(
Errore
query SQL:
INSERT INTO personal_messages( id_pm, id_pm_head, id_member_from, deleted_by_sender, from_name, msgtime, subject, body )
VALUES ( 2450, 2450, 158, 1, "ciccio69", 1220896345, "BEIJING 2008 OLYMPICS GAME - Informazioni sul prod", "Ciao edi volevo delle informazioni in più.<br />Grazie<br />Possibile in megaupload?" ) ,
Messaggio di MySQL: Documentazione
#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 '' at line 2
Ah it's the comma after the closing bracket.
Try:
INSERT INTO personal_messages ( id_pm , id_pm_head , id_member_from , deleted_by_sender , from_name , msgtime , subject , body )
VALUES ( 2450, 2450, 158, 1, "ciccio69", 1220896345, "BEIJING 2008 OLYMPICS GAME - Informazioni sul prod", "Ciao edi volevo delle informazioni in più.<br />Grazie<br />Possibile in megaupload?" )
Note you're missing the db prefix as well to the personal_messages table.
Quote from: Rumbaar on October 03, 2008, 08:53:15 AM
Ah it's the comma after the closing bracket.
Oh my god that was the problem...... leaving the bracket everything is ok...
Thx and sorry for this my silly mistake
Thx very much for your help guys.