September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool mysql_create_db(string database_name, [mysql link connection])
| database_name | Name for the new database |
| connection | Connection handle returned by mysql_connect() or mysql_pconnect() |
Creates a new database.
Returns:
TRUE on success; FALSE on failure
Description:
mysql_create_db() creates a new MySQL database named database_name , on the server specified by connection .
Caution:
It is often easier and more secure to create databases via a MySQL client as a privileged user.
Version:
PHP 3+, PHP 4+
See also:
To drop (delete) a database:
mysql_drop_db()
Example:
<?php // Connect to the default MySQL server $mysql_link = mysql_connect () or die ("Could not connect to the ... |
Read now
Unlock full access