|Subject:||what does this class do? just copy...|
|Summary:||Package rating comment|
Kevin Shu rated this package as follows:
|Examples: ||Not sure|
Kevin Shu - 2011-10-26 16:20:37
what does this class do? just copy sql clauses?
Orazio Principe - 2011-10-29 09:05:14 - In reply to message 1 from Kevin Shu
Exactly you can use it for example when you have a sql file that need to be executed for many database by php, you can retreive all queries with this class and you can execute them.
It's simple but usefull
Timo Henke - 2011-10-30 13:24:03 - In reply to message 2 from Orazio Principe
If you hava a VALID dump you could easily use, e.g. for mysql:
mysql -u'username -p'password -h'host' dbname < dumpfile ...
as a shellcommand / backtick ...
Also this way of "cutting out" the queries will blow up the memory of the script because it must hold all the queries in memory.
How about a 200-300MB SQL File? I've never seen any shared hosting company allowing such a size of memory for a single process.
Orazio Principe - 2011-10-31 14:55:38 - In reply to message 3 from Timo Henke
Many times when you update a softare you have to execute customs queries vs. many differents databases.
With a sqldump you can execute and import a backup, but if you need to upgrade for example 100 databases stored into the same server for exaple to alter a table, update some values etc, with this script you can store a simple sql file and than use a php script to execute all queries for all databases.