src/Koldy/Db/Model.php
public static function delete($where): int
    {
        $delete = new Delete(static::getTableName(), static::getAdapterConnection());

        if ($where instanceof Where) {
            $delete->where($where);
        } else if (is_array($where)) {
            foreach ($where as $field => $value) {
                $delete->where($field, $value);
            }
        } else if (!is_array(static::$primaryKey) && (is_numeric($where) || is_string($where))) {
            $delete->where(static::$primaryKey, $where);
        }

        return $delete->exec()->rowCount();
    }
public static function delete($where): int
    {
        $delete = new Delete(static::getTableName(), static::getAdapterConnection());

        if ($where instanceof Where) {
            $delete->where($where);
        } else if (is_array($where)) {
            foreach ($where as $field => $value) {
                $delete->where($field, $value);
            }
        } else if (!is_array(static::$primaryKey) && (is_numeric($where) || is_string($where))) {
            $delete->where(static::$primaryKey, $where);
        }

        return $delete->exec()->rowCount();
    }
public static function delete ( $ where ) : int { $ delete = new Delete ( static :: getTableName ( ) , static :: getAdapterConnection ( ) ) ; if ( $ where instanceof Where ) { $ delete -> where ( $ where ) ; } else if ( is_array ( $ where ) ) { foreach ( $ where as $ field => $ value ) { $ delete -> where ( $ field , $ value ) ; } } else if ( ! is_array ( static :: $ primaryKey ) && ( is_numeric ( $ where ) || is_string ( $ where ) ) ) { $ delete -> where ( static :: $ primaryKey , $ where ) ; } return $ delete -> exec ( ) -> rowCount ( ) ; }
Delete one or more records from the table defined in this model. If you
pass array, then array must contain field names and values that will be
used in WHERE statement. If you pass primitive value, method will treat
that as passed value for primary key field.

@param mixed $where

@return integer How many records is deleted
@throws Query\Exception
@throws \Koldy\Exception
@example User::delete(1);
@example User::delete(array('group_id' => 5, 'parent_id' => 10));
@example User::delete(array('parent_id' => 10, array('time', '>', '2013-08-01 00:00:00')))

@link http://koldy.net/docs/database/models#delete
Delete one or more records from the table defined in this model . If you pass array then array must contain field names and values that will be used in WHERE statement . If you pass primitive value method will treat that as passed value for primary key field .