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:
-
$tableis the name of the view, -
$existused to request verification of the existence of the view before deletion (this translates into the addition ofIF EXISTSto the SQL command). By default'', it includestrueto request the verification, -
$serveur, -
$option.
The sql_drop_view() function is used as follows:
sql_drop_view('view');
sql_drop_view('view', true);