From 712d20d9cf41e39674d3d726fbcdc8444b4d5a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D1=91=D0=B4=D0=BE=D1=80=20=D0=9F=D0=BE=D0=B4=D0=BB?= =?UTF-8?q?=D0=B5=D1=81=D0=BD=D0=BE=D0=B2?= Date: Thu, 14 Jul 2016 16:37:14 +0300 Subject: [PATCH] get id nextval --- core/database_pdo.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/database_pdo.php b/core/database_pdo.php index a9a0f2e..036f39e 100644 --- a/core/database_pdo.php +++ b/core/database_pdo.php @@ -131,10 +131,10 @@ class IdGenerator { } function getId($seq) { -// $result = $this->db->fetchOneArray("SELECT nextval('$seq')"); -// return $result['nextval']; - $result = $this->db->fetchOneArray("SELECT last_insert_rowid() AS nextval"); - return $result['nextval']; + $result = $this->db->fetchOneArray("SELECT nextval('$seq')"); + return $result['nextval']; +// $result = $this->db->fetchOneArray("SELECT last_insert_rowid() AS nextval"); +// return $result['nextval']; } }