skwashd's patch to use last_insert_id instead of an extra max(id) query

This commit is contained in:
Ralf Becker 2003-03-19 23:14:21 +00:00
parent 56ac75c659
commit 0b53b03eae

View File

@ -595,9 +595,7 @@
. ") VALUES ('$owner','$access','$cat_id','$tid','".$lid[1]
. implode("','",$this->loop_addslashes($stock_fields)) . "')",__LINE__,__FILE__);
$this->db->query("SELECT max(id) FROM $this->std_table ",__LINE__,__FILE__);
$this->db->next_record();
$id = $this->db->f(0);
$id = $id = $this->db->get_last_insert_id($this->std_table, 'id');
if(count($extra_fields))
{