Aymen++
03-29-2004, 10:31 AM
i tried to use this code to select a database named aymen:
<?php
$conn=mysql_connect();
mysql_select_db("aymen", $conn);
$sql="create table testTable (id int not null primary key auto_increment, testField varchar(75))";
$result=mysql_query($sql, $conn) or die(mysql_error());
echo $result;
?>
but i have this message:
No Database Selected
and i'm sure that i have the database named aymen.
<?php
$conn=mysql_connect();
mysql_select_db("aymen", $conn);
$sql="create table testTable (id int not null primary key auto_increment, testField varchar(75))";
$result=mysql_query($sql, $conn) or die(mysql_error());
echo $result;
?>
but i have this message:
No Database Selected
and i'm sure that i have the database named aymen.