Request for some usefule functions of database abstruction layer
andyhu - November 23, 2007 - 08:18
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | database system |
| Category: | feature request |
| Priority: | normal |
| Assigned: | andyhu |
| Status: | closed |
Jump to:
Description
Is that possible to write a general function that does the equivalent function of mysql_last_insert_id? If database provider changes, users can still use that function.
Also, it's better to have a mysql_free_result too.

#1
API changes and features will not happen in the 5.x branch, which is stable. Some of this functionality has been added to 6.x. If more is needed, please reopen with detailed and specific requests. Further changes will happen in 7.x at earliest.
#2
DBTNG already has this.
#3
Automatically closed -- issue fixed for two weeks with no activity.
#4
There is no (mysql|mysqli)_free_result at all in DB layer of drupal 6. ( Am I wrong? point me )
In the API docs for Drupal 7 I can't see also this.
Bad.
#5
#6
If an insert query generates a new autoincrement value, that value will be returned by InsertQuery::execute().
You almost never need to free an SQL result set yourself, as it will be freed automatically as soon as the variable goes out of scope. If you really do want to free the result set for some reason, then in D7 you can just unset($result).
Please do not reopen issues that have been auto-closed.