SMF Support > SMF 2.0.x Support

Error importing data in DB

(1/2) > >>

edi67:
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:


--- Code: ---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?'),

--- End code ---

Return me back this error:

--- Quote ---Error

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
--- End quote ---

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?

Oldiesmann:
Try getting rid of the ` marks around the table names - sometimes that can cause the error you're getting.

edi67:

--- 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.

--- End quote ---

I trying in this way:

--- Code: ---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?' ) ,
--- End code ---

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?

Rumbaar:
Try using double quotes instead of single quotes.

--- Code: ---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?" ) ,
--- End code ---

edi67:

--- Quote from: Rumbaar on October 02, 2008, 11:42:47 PM ---Try using double quotes instead of single quotes.

--- Code: ---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?" ) ,
--- End code ---

--- End quote ---

Donw but... same error :(

--- Code: ---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
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version