i am unable to get this code to work... I am not sure where the problem is... plase assist... thanks:
$dbh=mysql_connect("localhost","user","password");
if($dbh)
{
echo "Connected to MySql Server<Br>";
}
else
{
echo mysql_error();
}
$select=mysql_select_db("students");
if($select)
{
echo "database selected<br>";
}
$query=mysql_query("CREATE TABLE friendslist (id INT AUTO_INCREMENT PRIMARY KEY, requestorid INT not null,requestedid INT not null,requestedate TIMESTAMP not null, response varchar(10) null");
if($query)
{
echo "Tables created";
}
urgent help...
Moderator: General Moderators
Re: urgent help...
Code: Select all
[color=#FF0000]$select=mysql_select_db("students");[/color]
$select=mysql_select_db("students",$dbh);
[color=#FF0000]$query=mysql_query("CREATE TABLE friendslist (id INT AUTO_INCREMENT PRIMARY KEY, requestorid INT not null,requestedid INT not null,requestedate TIMESTAMP not null, response varchar(10) null");[/color]
$query=mysql_query("CREATE TABLE friendslist (id INT AUTO_INCREMENT PRIMARY KEY, requestorid INT not null,requestedid INT not null,requestedate TIMESTAMP not null, response varchar(10) null",$dbh);