Home    Back    Forward    Refresh    txtSQL Homepage

dropdb
Purpose: To permanently delete a txtSQL database
txtSQL >= 2.0.0 Beta
void dropdb ( array( 'db' => $db ) )

This function will PERMANENTLY drop a database ( so that means no undo-ing ), as long as it exists

Note- This function will return false if the database doesn't already exists, or if the database specified is 'txtsql'


Example 9: dropdb() Copy to clipboard
<?php
// txtSQL dropped a database named testDatabase
if ( !$sql->dropdb(array('db' => 'testDatabase')) )
{
    die(
'Error creating txtSQL DB, txtSQL said: '.$sql->get_last_error());
}
?>


User Comments - dropdb
No comments posted yet;
Last Page Next Page

'Language Reference'

User Functions

Database Functions
  • showdbs
  • createdb
  • dropdb
  • renamedb
  • isLocked
  • lockdb
  • unlockdb
  • selectdb
  • db_exists

    Data Manipulation Functions

    Table Functions

    Error Handling Functions

    SQL Syntax

  • [ txtSQL Documentation powered by txtSQL | 6 SQL Queries ]