mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Insert NULL instead of 0 for next sequence
https://xetown.com/questions/1627614 sql_mode에 NO_AUTO_VALUE_ON_ZERO가 포함되어 있는 경우 0을 입력하면 AUTO_INCREMENT가 작동하지 않음
This commit is contained in:
parent
093fa43e37
commit
0118962a8f
1 changed files with 1 additions and 1 deletions
|
|
@ -678,7 +678,7 @@ class DB
|
|||
*/
|
||||
public function getNextSequence()
|
||||
{
|
||||
$this->_handle->exec(sprintf('INSERT INTO `%s` (seq) VALUES (0)', $this->addQuotes($this->_prefix . 'sequence')));
|
||||
$this->_handle->exec(sprintf('INSERT INTO `%s` (seq) VALUES (NULL)', $this->addQuotes($this->_prefix . 'sequence')));
|
||||
$sequence = $this->getInsertID();
|
||||
if ($this->isError())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue