Login +

Documentation

SLS_FrontModel::deleteModels

Since SillySmart

Description

Delete n objects of models
public deleteModels ( string $table, array $joins, array $clause);

Parameters

  • string $table
    the current table to delete (default: empty => current model)
  • array $joins
    the table(s) to join with current table (default: empty => no join) If you want to natural join:
    array("table_2","table_3","...","table_n")
    will give 'DELETE FROM table_1 NATURAL JOIN table_2 NATURAL JOIN table_3 ... NATURAL JOIN table_n' If you want to join with a specific column:
    array(0=>array("table"=>"table_2","column"=>"column_2"),1=>array("table"=>"table_3","column"=>"column_3"))
  • array $clause
    the clause wanted (default: empty => no clause)
     array
     (
    ||t||||t||[0] => array
    ||t||||t||||t||||t||(
    ||t||||t||||t||||t||||t||["column"] = "column_1",
    ||t||||t||||t||||t||||t||["value"] = "value_1",
    ||t||||t||||t||||t||||t||["mode"] = "like" or "notlike" or "beginwith" or "endwith" or "equal" or "notequal" or "lt" or "le" or "ge" or "gt" or "null" or "notnull"
    ||t||||t||||t||||t||)
    ||t||||t||[1] => array
    ||t||||t||||t||||t||(
    ||t||||t||||t||||t||||t||["column"] = "user_department",
    ||t||||t||||t||||t||||t||["value"] = "75",
    ||t||||t||||t||||t||||t||["mode"] = "like" or "notlike" or "beginwith" or "endwith" or "equal" or "notequal" or "lt" or "le" or "ge" or "gt" or "null" or "notnull"
    ||t||||t||||t||||t||)
     )
     

Return

No return.
No exemples.

Comments

No comment on this function, be the first !

Add your comment

You must login/register to post a reply.