sphinx\ActiveRecord deleteAll()

deleteAll() public static method

Deletes rows in the index using the provided conditions.

For example, to delete all articles whose status is 3:

Article::deleteAll('status = 3');
public static integer deleteAll ( $condition = '', $params = [] )
$condition string|array

The conditions that will be put in the WHERE part of the DELETE SQL. Please refer to yii\sphinx\Query::where() on how to specify this parameter.

$params array

The parameters (name => value) to be bound to the query.

return integer

The number of rows deleted

doc_Yii
2016-10-30 17:11:35
Comments
Leave a Comment

Please login to continue.