C:\>mysql -uroot -padmin
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.37-community-nt-log MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases
-> ;
+--------------------+
| Database |
+--------------------+
| information_schema |
| attendance |
| fusionchartsdb |
| mysql |
| sugarcrm |
| test |
+--------------------+
6 rows in set (0.09 sec)
mysql> use mysql;
Database changed
mysql>
So I want to start a process by mysql -uroot -padmin
,and in that process I want to run these statements:
show databases
use mysql
insert xxx (..) values (..)
How to do it in PHP?