开发者

Php / MySql advice

开发者 https://www.devze.com 2023-03-07 23:22 出处:网络
I need to have a button to fire an action to copy all records from a defined client from one database to another with ph开发者_运维问答p.

I need to have a button to fire an action to copy all records from a defined client from one database to another with ph开发者_运维问答p.

The template database has 12 tables (diferent rows on each) but all with the row client_id to make the WHERE clausule work properly.

The question is, how do I do this?

Thanks,

Pluda


Since PHP is a Server-side programming language, you can't copy something from the client. You can however upload Data (like XML), parse it and then insert it into your MySQL Database.

If you want to copy records from one to another database, you might want to read from the Database and save them in a format like SQL. Then, you could send those querys to the second Database.

An advise at this point: If you need to make the same Query (with different values) over and over again, you should use a PreparedStatement. It will be compiled in the Database and then just filled out with new values. This is way faster then using an Insert every time.

0

精彩评论

暂无评论...
验证码 换一张
取 消