src/PicORM/Model.php
public function delete()
    {
        // validate model PHP structure if necessary
        static::_validateModel();

        // build delete query helper for this model
        $query = new InternalQueryHelper();
        $query->delete(self::formatTableNameMySQL())
              ->where(static::$_primaryKey, "=", "?");

        // delete model from database
        $query = static::$_dataSource->prepare($query->buildQuery());
        $query->execute(array($this->{static::$_primaryKey}));

        // check for mysql error
        $errorcode = $query->errorInfo();
        if ($errorcode[0] != "00000") {
            throw new Exception($errorcode[2]);
        }

        // model is not stored anymore in database
        $this->_isNew = true;

        return true;
    }
public function delete()
    {
        // validate model PHP structure if necessary
        static::_validateModel();

        // build delete query helper for this model
        $query = new InternalQueryHelper();
        $query->delete(self::formatTableNameMySQL())
              ->where(static::$_primaryKey, "=", "?");

        // delete model from database
        $query = static::$_dataSource->prepare($query->buildQuery());
        $query->execute(array($this->{static::$_primaryKey}));

        // check for mysql error
        $errorcode = $query->errorInfo();
        if ($errorcode[0] != "00000") {
            throw new Exception($errorcode[2]);
        }

        // model is not stored anymore in database
        $this->_isNew = true;

        return true;
    }
Delete this model from database

@return array
@throws Exception