Toms Homepage
  Home    Downloads    Your Account    Forums  
  Create an account
Modules
· Home
· Games
· My Gallery
· PHP Manual
· PHP-Nuke HOWTO
· Web Links
· Your Account
 
Who's Online
Welcome, Anonymous
Nickname

Password

Security Code
Security Code
Type Security Code


(Register)

Membership:
Latest: CMKSybil
New Today: 449
New Yesterday: 568
Overall: 47401

People Online:
Visitors: 64
Members: 10
Total: 74

Online Now:
COM SammieCon
COM MarilouCh
COM TrudyBatt
COM AlvinSage
 ShaniBeat
COM TammaraNT
COM RosellaLe
Poland CMKSybil
 ElaineCha
COM DouglasGa
 
mysql_create_db

mysql_create_db

(PHP 3, PHP 4 , PHP 5)

mysql_create_db -- Create a MySQL database

Description

bool mysql_create_db ( string database_name [, resource link_identifier] )

mysql_create_db() attempts to create a new database on the server associated with the specified link identifier.

Returns TRUE on success or FALSE on failure.

Example 1. MySQL create database example

<?php
$link
= mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!
$link) {
    die(
'Could not connect: ' . mysql_error());
}

if (
mysql_create_db('my_db')) {
    echo
"Database created successfully\n";
} else {
    echo
'Error creating database: ' . mysql_error() . "\n";
}
?>


For downwards compatibility mysql_createdb() can also be used. This is deprecated, however.

Note: The function mysql_create_db() is deprecated. It is preferable to use mysql_query() to issue a SQL CREATE DATABASE Statement instead.

Warning

This function will not be available if the MySQL extension was built against a MySQL 4.x client library.

See also mysql_query().

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2004 by Tom Nitzschner.
Web site engine code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.101 Seconds

:: VereorLCARS phpbb2 style by Vereor :: PHP-Nuke theme by www.nukemods.com ::