The sql_drop_view()
function deletes a database view. It accepts the same parameters as sql_drop_table()
and returns true
if successful and false
if not.
Its 4 parameters are:
-
$table
is the name of the view, -
$exist
used to request verification of the existence of the view before deletion (this translates into the addition ofIF EXISTS
to the SQL command). By default''
, it includestrue
to request the verification, -
$serveur
, -
$option
.
The sql_drop_view()
function is used as follows:
sql_drop_view('view');
sql_drop_view('view', true);