mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE: Removed DB::getNextID(), which was deprecated some time ago
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80224 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2926b34e50
commit
86ccd8cb96
@ -139,15 +139,6 @@ class DB {
|
|||||||
return DB::$globalConn->getGeneratedID($table);
|
return DB::$globalConn->getGeneratedID($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the ID for the next new record for the table.
|
|
||||||
* @var string $table The name od the table.
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
static function getNextID($table) {
|
|
||||||
return DB::$globalConn->getNextID($table);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the connection to the database is active.
|
* Check if the connection to the database is active.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
|
@ -112,18 +112,6 @@ class MySQLDatabase extends Database {
|
|||||||
return mysql_insert_id($this->dbConn);
|
return mysql_insert_id($this->dbConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* OBSOLETE: Get the ID for the next new record for the table.
|
|
||||||
*
|
|
||||||
* @var string $table The name od the table.
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getNextID($table) {
|
|
||||||
user_error('getNextID is OBSOLETE (and will no longer work properly)', E_USER_WARNING);
|
|
||||||
$result = $this->query("SELECT MAX(ID)+1 FROM \"$table\"")->value();
|
|
||||||
return $result ? $result : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function isActive() {
|
public function isActive() {
|
||||||
return $this->active ? true : false;
|
return $this->active ? true : false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user