mysql_create_db
(PHP 3, PHP 4 )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, FALSE on failure. Example 1. MySQL create database example<?php
    $link = mysql_pconnect("localhost", "mysql_user", "mysql_password")
        or exit("Could not connect");    if (mysql_create_db("my_db")) {
        print ("Database created successfully\n");
    } else {
        printf ("Error creating database: %s\n", mysql_error ());
    }
?>
 
 For downwards compatibility mysql_createdb() can also be used. This is deprecated, however. 
// \\\\\\\\\上面是建立数据库的函数,摘自PHP手册建立数据表可用SQL语句。
例如:CREATE TABLE cpfw_news (
  id int(10) unsigned NOT NULL auto_increment,
  title varchar(100) NOT NULL default '',
  author varchar(20) NOT NULL default '',
  text mediumtext,
  image mediumtext,
  date varchar(20) NOT NULL default '',
  isshow int(6) NOT NULL default '0',
  PRIMARY KEY  (id)
)可以用mysql_query函数来实现。
=====================================
我的论坛:www.feelermusic.com/bbs/