summaryrefslogtreecommitdiff
path: root/includes/database.mysqli.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-06-05 12:13:23 +0000
committerDries Buytaert <dries@buytaert.net>2007-06-05 12:13:23 +0000
commit27388f66557cddce6aff1cc945601c5f843304cd (patch)
tree3a12f2afdc14b5af5be1b03d9c1fde6ac3d77928 /includes/database.mysqli.inc
parent745222200e0670f55c6d695e467558171b7bb5d8 (diff)
downloadbrdo-27388f66557cddce6aff1cc945601c5f843304cd.tar.gz
brdo-27388f66557cddce6aff1cc945601c5f843304cd.tar.bz2
- Patch #149176 by chx, David et al: getting rid of the sequences table, using db_last_insert_id() instead of db_next_id().
Diffstat (limited to 'includes/database.mysqli.inc')
-rw-r--r--includes/database.mysqli.inc19
1 files changed, 0 insertions, 19 deletions
diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc
index baac124de..3bc058da8 100644
--- a/includes/database.mysqli.inc
+++ b/includes/database.mysqli.inc
@@ -231,25 +231,6 @@ function db_error() {
}
/**
- * Return a new unique ID in the given sequence.
- *
- * For compatibility reasons, Drupal does not use auto-numbered fields in its
- * database tables. Instead, this function is used to return a new unique ID
- * of the type requested. If necessary, a new sequence with the given name
- * will be created.
- *
- * Note that the table name should be in curly brackets to preserve compatibility
- * with table prefixes. For example, db_next_id('{node}_nid');
- */
-function db_next_id($name) {
- global $active_db;
- $name = db_prefix_tables($name);
- db_query('INSERT INTO {sequences} VALUES ("%s", LAST_INSERT_ID(1)) ON DUPLICATE KEY UPDATE id = LAST_INSERT_ID(id + 1)', $name);
-
- return mysqli_insert_id($active_db);
-}
-
-/**
* Determine the number of rows changed by the preceding query.
*/
function db_affected_rows() {