'Language Reference'
User Functions
Database Functions
showdbs
createdb
dropdb
renamedb
isLocked
lockdb
unlockdb
selectdb
db_exists
Data Manipulation Functions
Table Functions
Error Handling Functions
|
Usage |
bool renamedb ( array( $olddb, $newdb ) ) |
Purpose |
To rename an existing txtSQL database |
Availability |
txtSQL >= 2.0.0 Beta |
This function will rename a txtSQL database, $dbname, to the given name, $newdb.
Note- This function will return false if the database doesn't already exists, or if the new database name already exists
Example 10: renamedb()
| Copy to Clipboard |
<?php
// txtSQL renamed a database, 'testDatabase', to 'testDB'
if ( !$sql->renamedb(array('testDatabase', 'testDB')) )
{
die('Error renaming database, txtSQL said: '.$sql->get_last_error());
}
?>
|
User-Contributed Comments for: renamedb() |
|
No comments found; |
|