Skip to content

Commit

Permalink
Removed more methods that is implemented by DboSource.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed May 6, 2011
1 parent f11b153 commit 83b81ff
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions lib/Cake/Model/Datasource/Database/Mssql.php
Expand Up @@ -338,58 +338,6 @@ function update($model, $fields = array(), $values = null, $conditions = null) {
return parent::update($model, array_keys($fields), array_values($fields), $conditions);
}

/**
* Returns a formatted error message from previous database operation.
*
* @return string Error message with error number
*/
function lastError() {
if ($this->__lastQueryHadError) {
$error = mssql_get_last_message();
if ($error && !preg_match('/contexto de la base de datos a|contesto di database|changed database|contexte de la base de don|datenbankkontext/i', $error)) {
return $error;
}
}
return null;
}

/**
* Returns number of affected rows in previous database operation. If no previous operation exists,
* this returns false.
*
* @return integer Number of affected rows
*/
function lastAffected() {
if ($this->_result) {
return mssql_rows_affected($this->connection);
}
return null;
}

/**
* Returns number of rows in previous resultset. If no previous resultset exists,
* this returns false.
*
* @return integer Number of rows in resultset
*/
function lastNumRows() {
if ($this->_result) {
return @mssql_num_rows($this->_result);
}
return null;
}

/**
* Returns the ID generated from the previous INSERT operation.
*
* @param unknown_type $source
* @return in
*/
function lastInsertId($source = null) {
$id = $this->fetchRow('SELECT SCOPE_IDENTITY() AS insertID', false);
return $id[0]['insertID'];
}

/**
* Returns a limit statement in the correct format for the particular database.
*
Expand Down

0 comments on commit 83b81ff

Please sign in to comment.