Using PHP code
How can I backup all database ?
How can I backup MyTable1 and MyTable2 only in one file.sql ?
You could use phpMyAdmin here: http://phpmyadmin.sourceforge.net/download.html if you want to just backup manually at a single time.
Otherwise, look into just creating a shell script and using Cron to schedule backup times for running the script. That is if you are using a server that is running a Unix/Linux flavor.
I do not want to use phpmyadmin. I want php code to do that.