MySQL Create Database
Posted: Fri Jun 17, 2005 6:27 am
Hi there,
I use different codes for connecting, create tables etc.etc. and everything seems to work. But unfortunatly I have this one problem not to be able to create a DB with PhP. I have to create the DB in a prompt and than fine, but not the Create DB with PhP ???.
My error message:
I use different codes here as well i.e. PhP web site, but this is the easy one still no luck:
Thanks for any help: aktell
I use different codes for connecting, create tables etc.etc. and everything seems to work. But unfortunatly I have this one problem not to be able to create a DB with PhP. I have to create the DB in a prompt and than fine, but not the Create DB with PhP ???.
My error message:
Code: Select all
Fatal error: Call to undefined function mysql_create_db()Code: Select all
<?
$link = mysql_connect("localhost","root", "Password");
if (! $link)
die("Couldn't connect to MySQL");
//create database
mysql_create_db("mydatabase")or die("Create Error: ".mysql_error());
mysql_close($link);
?>