restore backup file..



hi guys..i want to restore my backup database file (backup.sql) into the mysql database. anybody knows how to write the PHP codes for that???if i'm using the upload file,is it working??? :help:
phpmyadmin has the ability to do it.. grab their code and see how they do it. if yer using mysqli it has the ability with mysqli_multi_query that requires atleast mysql 4.1
huh..actually my backup file is a SQL file (backup.sql). So, i want to make the restore page which allow user to make the restoration. May be, by clicking the restore button, the backup.sql file will be executed automatically without do it in the phpmyadmin. I hope you can uncerstand what i'm trying to explain here..
the sql file has to be somehow parsed and excecuted. phpmyadmin features a really smart way to upload, parse and excecute the code.

SQL file is simply a set of commands (SQL queries)
This means that you either have to do it manually, most often a pain in the ass OR do it with pma
yes we can.. to some point..
The problem nr 1 is that we still have to upload it, problem number 2 is that the SQL should be 100% correct
PMA has some small addaptations that it makes depending on a server type and the SQL file... but possible as well..
Simply smarter to use PMA ;)