* @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version $Id: droptable.inc 239211 2007-07-06 05:19:21Z aharvey $ * @link http://pear.php.net/package/DB */ /** * Drops the requested table * * @param object $dbh the PEAR DB object currently in use * @param string $table the name of the table to be dropped * * @return int DB_OK on success. DB_Error object on failure. */ function drop_table($dbh, $table) { switch ($dbh->phptype) { case 'fbsql': $res = $dbh->query("DROP TABLE $table CASCADE"); break; default: $res = $dbh->query("DROP TABLE $table"); } return $res; }