I have an application with this directory tree:
3.0
3.0.0
patch1.sql
patch2.sql
3.0.1
...
3.0.2
...
3.0.3
...
3.1
3.1.0
3.1.1
4.0
4.0.0
4.0.1
4.0.2
In every directory I have 1 or more file sql file.
How I can execute these sql file trough php? I need to have the response back (in case of errors).
I found this command, but how I can check for errors?
mysql -u yourusername -p yourpassword yourdatabase < sql_file