NYCPHP Meetup

NYPHP.org

[nycphp-talk] mysql command line

Oktay Altunergil nyphp at altunergil.com
Tue Jun 25 10:24:48 EDT 2002


I recommend creating a seperate database and importing all records into that temp database. Rung a few sql statements ( DELETE FROM blah WHERE company_id <> 20 ) to end up with just what you want. Then take a dump of that database with the -t switch (do not include CREATE TABLE statements) and import that into your real database. Hoping you will only have to do this kind of thing one or two times during your lifetime, there should be no need to look for software that does this. Having said that, an application that can read the SQL statements and represent them in a format that you can work with (select/delete portions etc) shouldn't be too hard to code for people who can actually code that kind of stuff (not me).

Oktay Altunergil

On Tue, 25 Jun 2002 10:12:07 -0400
Ian Forsyth <ian at plusfour.org> wrote:

> 
> Is there any utility out there that allows you to import selective records
> from a mysqldump.sql file?
> 
> for instance..
> 
> On June 12 I made a back up of the database on june 13 i deleted products
> having a compandy_id = 20, on june 14 we needed those products back, and
> lots of other products where updated so i can't just dump the table and
> replace it..
> 
> so is there any thing already made that would allow me to import the records
> from the product table that have a company_id = 20 from a mysqldump.sql file
> (meaning it has create table and insert statements, its no tab seperated)...
> 
> Ian
> 
> 



More information about the talk mailing list