Orm/Gateway/TableAbstract.php
protected function _delete($where)
    {
        $params = array();
        $query = "DELETE FROM $this->_name";

        $iWhere = 0;
        $query .= " WHERE (";
        foreach ($where as $key => $value) {
            if (!is_int($key)) {
                $query .= "$key = :where$iWhere AND ";
                $params[":where$iWhere"] = $value;
                $iWhere++;
            } else {
                $query .= "$value AND";
            }
        }
        $query = substr($query, 0, -4);
        $query .= ")";

        $db = $this->db;
        $sth = $db->prepare($query);

        foreach ($params as $key => $val) {
            if (is_int($val)) {
                $sth->bindValue("$key", $val, $db::PARAM_INT);
            } else {
                $sth->bindValue("$key", $val);
            }
        }

        $response = $sth->execute();

        if ($response) {

            return true;
        }

        return false;
    }
protected function _delete($where)
    {
        $params = array();
        $query = "DELETE FROM $this->_name";

        $iWhere = 0;
        $query .= " WHERE (";
        foreach ($where as $key => $value) {
            if (!is_int($key)) {
                $query .= "$key = :where$iWhere AND ";
                $params[":where$iWhere"] = $value;
                $iWhere++;
            } else {
                $query .= "$value AND";
            }
        }
        $query = substr($query, 0, -4);
        $query .= ")";

        $db = $this->db;
        $sth = $db->prepare($query);

        foreach ($params as $key => $val) {
            if (is_int($val)) {
                $sth->bindValue("$key", $val, $db::PARAM_INT);
            } else {
                $sth->bindValue("$key", $val);
            }
        }

        $response = $sth->execute();

        if ($response) {

            return true;
        }

        return false;
    }
protected function _delete ( $ where ) { $ params = array ( ) ; $ query = "DELETE FROM $this->_name" ; $ iWhere = 0 ; $ query .= " WHERE (" ; foreach ( $ where as $ key => $ value ) { if ( ! is_int ( $ key ) ) { $ query .= "$key = :where$iWhere AND " ; $ params [ ":where$iWhere" ] = $ value ; $ iWhere ++ ; } else { $ query .= "$value AND" ; } } $ query = substr ( $ query , 0 , - 4 ) ; $ query .= ")" ; $ db = $ this -> db ; $ sth = $ db -> prepare ( $ query ) ; foreach ( $ params as $ key => $ val ) { if ( is_int ( $ val ) ) { $ sth -> bindValue ( "$key" , $ val , $ db :: PARAM_INT ) ; } else { $ sth -> bindValue ( "$key" , $ val ) ; } } $ response = $ sth -> execute ( ) ; if ( $ response ) { return true ; } return false ; }
Delete a row or rowset

@param array $where Where conditions array
@return bool
Delete a row or rowset