The conn method commonly used in php-very weak problem. I went into contact with php on the first day and read the w3 tutorial. The problem is weak and has very few points. Mysql may have multiple databases (database 01, database 02, and database 03). Should I write the following statements when writing conn. php? & Lt ;? Php $ conn = m common conn writing in php-very weak problem
The first day of contact with php, read the w3 tutorial. The problem is weak and has very few points.
Mysql may have multiple databases (database 01, database 02, and database 03)
Should I write conn. php as follows?
$ Conn = mysql_connect ("mysql database address", "username", "password ")
Mysql_select_db ("database 01", $ conn );
?>
And then in all files
Share:
------ Solution --------------------
Yes
------ Solution --------------------
The database name should be in English, which is more stable.
------ Solution --------------------
Well, it is like this.
------ Solution --------------------
Conn. php
$ Conn = mysql_connect ("mysql database address", "username", "password ");
Search, php
Include 'Conn. php ';
Mysql_select_db ("database 01", $ conn );
...
Mysql_close ($ conn );
Include 'Conn. php ';
Mysql_select_db ("database 02", $ conn );
...
Mysql_close ($ conn );
Include 'Conn. php ';
Mysql_select_db ("database 03", $ conn );
...
Mysql_close ($ conn );
?>