Eugene
07-25-2007, 02:17 AM
Hi
I am currently doing a web project using wamp5. Right now this is how
i am connecting to the database:
$con = mysql_connect("localhost", "root", "");
if (!con) {
die('Could not Connect' . mysql_error());
}
if (!mysql_select_db("Leave", $con)){
die (mysql_error());
}
else {
.......
}
When the code above is activated, this is the result:
"Unknown database 'leave' "
Could there be anything in mysql that i might have done wrong that
triggers the error? or maybe there is a problem in my $con object in
the 1st place?
Help is much appreciated
thanks :)
I am currently doing a web project using wamp5. Right now this is how
i am connecting to the database:
$con = mysql_connect("localhost", "root", "");
if (!con) {
die('Could not Connect' . mysql_error());
}
if (!mysql_select_db("Leave", $con)){
die (mysql_error());
}
else {
.......
}
When the code above is activated, this is the result:
"Unknown database 'leave' "
Could there be anything in mysql that i might have done wrong that
triggers the error? or maybe there is a problem in my $con object in
the 1st place?
Help is much appreciated
thanks :)