Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

import sql dump

Status
Not open for further replies.

jetned

IS-IT--Management
Dec 4, 2004
1
DE
Howdy,


I can't recover my database from a SQL Dump built by phpMyAdmin because of the following problem:

The dumb has sql commands for creating the tables, but has the command "UPDATE" rather than the "INSERT" data command. Since the DB is empty, I can't import the data because the update command does not work without having the respective database entries, as specified by "WHERE" (part of the UPDATE command). For example:

UPDATE `results` SET `rid` = 19844, `sid` = 28, `qid` = 251, `avid` = 3629, `entered` = 1101883926, `sequence` = 1556 WHERE `rid` = '19844';


How can I get around manually inserting the data required by the WHERE command before importing the sql dumb? Any help or suggestions are welcome. Thanks.

Oliver
 
Just edit the dump file, changing the UPDATE to INSERT and getting rid of the WHERE clause.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top