/** * Add's a sequence field to the query. * * @param string $fieldName field name * @param int $value field to store the new sequence value in, note certain drivers * might populate this field only after the insert query has been * executed * @param string $seqName sequence name (optional for certain drivers) * * @return Query */ public function addSequenceField($fieldName, &$value, $seqName = null) { $meta = $this->getDb()->tableMeta($this->m_tables[0]); if (!Tools::hasFlag($meta[$fieldName]['flags'], Db::MF_AUTO_INCREMENT)) { return parent::addSequenceField($fieldName, $value, $seqName); } $this->m_seqValue =& $value; $this->m_seqValue = -1; $this->m_seqField = $fieldName; $this->m_returnSeqValue = true; return $this; }