I want to save some specific records from a database to a file, thus:
"select, export etc" * from tbl1 where ClientName = 'DemoAccount';
should generate output
insert into tbl1 ...
Is this possible w/o any script generating the requested result?
if not, any knowledge of appropriate php-class?
:edit:
decent solution, (sql prefeered though..):
backup:
select * from tbl1 where ClientName='DemoAccount' into outfile '/opt/demo.sql'
restore:
delete from开发者_JS百科 tbl1 where ClientName='DemoAccount';
LOAD DATA INFILE '/opt/mysql.sql' into table tbl1;
regards, //t
You can use mysqldump with the --where
(or -w
) option, which allows you to specify a WHERE clause.
mysqldump -w "ClientName = 'DemoAccount'" ...other options...
精彩评论