Adscend

Click Here



Click Here



Click Here

Tuesday 3 September 2013

DROP DATABASE Function

DROP DATABASE Function


1.The DROP DATABASE statement is used to create a database.

Syntax
DROP DATABASE dbname;

Example: 1
<?php
$hostname = "localhost";
$username = "root";
$password = "";
$con = mysql_connect("$hostname", "$username", "$password");
if(!$con)
{
die("Could not connect: " . mysql_error());
}
echo "Connected successfully<br />";
$sql = "DROP DATABASE Aspell";
$retval = mysql_query( $sql, $con);
if(!$retval )
{
die("Could not delete database: " . mysql_error());
}
echo "Database Aspell deleted successfully\n";
mysql_close($con);
?>
Output
Connected successfully
Database Aspell deleted successfully

No comments:

Post a Comment