sql_drop_view

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:

  1. $table is the name of the view,
  2. $exist used to request verification of the existence of the view before deletion (this translates into the addition of IF EXISTS to the SQL command). By default '', it includes true to request the verification,
  3. $serveur,
  4. $option.

The sql_drop_view() function is used as follows:

sql_drop_view('view');
sql_drop_view('view', true);

Author Mark Baber Published : Updated : 01/06/10

Translations : English, français