E.O.N. - Everything Old and New
Everything in Trend, Everything Hated, Everything Liked.
Tuesday, January 6, 2015
Dropping or Deleting Databases and Tables
To Drop / Delete a
DATABASE or Table
, Use the following codes:
'; $sql = 'DROP DATABASE my_database'; $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not delete database: ' . mysql_error()); } echo "Database my_database deleted successfully\n"; mysql_close($conn); ?> - To Delete Tables in a Database Use the following codes: '; $sql = "DROP TABLE biodata"; mysql_select_db( 'my_database' ); $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not delete table: ' . mysql_error()); } echo "Table deleted successfully\n"; mysql_close($conn); ?> -
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment