DROP: Getting Drop Types
/**
* Returns the SQL keyword indicating a DROP TABLE statement should
* CASCADE to related tables
*
* @return string the query fragment your DBMS needs
*/
function getDropCascade() {
return $this->DropCascade;
}
/**
* Returns the SQL keyword indicating a DROP TABLE statement should
* RESTRICT itself to the present table
*
* @return string the query fragment your DBMS needs
*/
function getDropRestrict() {
return $this->DropRestrict;
}
require 'connect.inc';
$db->query('CREATE TABLE xyz (c CHAR(1))');
$query = 'DROP TABLE xyz ' . $p->getDropCascade();
echo $query;
$db->query($query);
fbsql
DROP TABLE xyz CASCADE |