1
0
mirror of https://github.com/beestat/app.git synced 2026-05-13 10:52:29 -04:00

Optimized away a slow query into a transaction.

This commit is contained in:
Jon Ziebell
2021-02-26 14:51:59 -05:00
parent 1c65cd6fcf
commit 089cbb69e3
4 changed files with 35 additions and 13 deletions
+3 -1
View File
@@ -713,7 +713,9 @@ final class database extends \mysqli {
* return the newly created row (does a database read). Specifying id will
* return just the ID of the created row.
*
* @return int The primary key of the inserted row.
* @return mixed Either the primary key of the inserted row or the inserted
* row. If the row is not needed it's faster to return the ID to avoid
* another select.
*/
public function create($resource, $attributes, $return_mode = 'row') {
$table = $this->get_table($resource);