array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.mysql-drop-db.php', 1 => 'mysql_drop_db', ), 'up' => array ( 0 => 'ref.mysql.php', 1 => 'MySQL İşlevleri', ), 'prev' => array ( 0 => 'function.mysql-db-query.php', 1 => 'mysql_db_query', ), 'next' => array ( 0 => 'function.mysql-errno.php', 1 => 'mysql_errno', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mysql/functions/mysql-drop-db.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5)
mysql_drop_db — Drop (delete) a MySQL database
PHP 4.3.0 itibariyle bu işlevin kullanımı önerilmemekte olup bu işlev ve özgün MySQL eklentisinin tamamı PHP 7.0.0 itibariyle kaldırılmıştır. Yerine, etkin olarak geliştirilmekte olan MySQLi veya PDO_MySQL extensions kullanılabilir. Ek bilgi: MySQL: Bir API Seçimi Bu işlev yerine kullanılabilecekler:
DROP DATABASE
query
mysql_drop_db() attempts to drop (remove) an
entire database from the server associated with the specified
link identifier. This function is deprecated, it is preferable to use
mysql_query() to issue an sql
DROP DATABASE
statement instead.
database_name
The name of the database that will be deleted.
bağlantı_belirteci
MySQL bağlantısı. Eğer bağlantı belirteci belirtilmemişse
mysql_connect() tarafından açılan son bağlantı
kullanılmaya çalışılır. Eğer böyle bir bağlantı yoksa
mysql_connect() bağımsız değişkensiz olarak çağrılmış gibi bir
bağlantı oluşturmaya çalışır. Hiçbir bağlantı yoksa ve yenisi de
kurulamazsa E_WARNING
seviyesinde bir hata
üretilir.
Örnek 1 mysql_drop_db() alternative example
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$sql = 'DROP DATABASE my_db';
if (mysql_query($sql, $link)) {
echo "Database my_db was successfully dropped\n";
} else {
echo 'Error dropping database: ' . mysql_error() . "\n";
}
?>
This function will not be available if the MySQL extension was built against a MySQL 4.x client library.
Bilginize:
Geriye uyumluluk adına, kullanımı önerilmese de şu takma ad kullanılabilir: mysql_dropdb()