Forums
This topic is locked
how to delete database
Posted 05 Mar 2007 03:06:02
1
has voted
05 Mar 2007 03:06:02 LorD ExoskeletoN posted:
good day dear expert...here i am again...i have a problem on how to delete database!$hostname="localhost";
$database="dbname";
if( !$pg_con=pg_connect("host=$hostname database=$database user=user1 password=pass1" ) {
print "Error : connect to ${hostname}<br>";
exit;
}
$del_database = "DROP DATABASE db_yy";
$exec = pg_exec($del_database);
is this correct? another thing is...how to connect to server? i connect with the usual way having database to connect to just like above written. but here of course i think you just need to connect to server in order to delete database. but i dont know how...please help
im using postgre BTW
TIA
<center>
afraid NOT to FAIL for you learn NOTHING
www.nasbikesphilippines.bravehost.com
<img src="www.motorcyclephilippines.com/forums/signaturepics/sigpic14460_2.gif" border=0></center>