From 4c83a63533d8616e01d2ac473f98f4a2dc6bb1be Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 27 Sep 2011 14:47:01 +0300 Subject: pass param, sequence id support --- MainController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'MainController.php') diff --git a/MainController.php b/MainController.php index 17e7167..65ae757 100644 --- a/MainController.php +++ b/MainController.php @@ -367,8 +367,9 @@ class MainController $val = implode(', ', array_keys($values)); $this->sql_insert = sprintf($this->sql_insert, $this->table, $insert, $val); - - return MainDb::query($this->sql_insert, $values); + $seq_id = sprintf( '%s_id_seq', strtolower(get_called_class()) ); + + return MainDb::query( $this->sql_insert, $values, $seq_id ); } -- cgit v1.2.3