From 7cc6cea2d421862726081a39e932dbceeefcc775 Mon Sep 17 00:00:00 2001 From: Adrian Voicu Date: Fri, 10 Jul 2015 14:41:25 +0300 Subject: allow add of keys with array This will allow adding multiple keys using array (http://www.codeigniter.com/user_guide/database/forge.html#adding-keys). Only if user wants, he can use the table columns to set a primary key by setting second parameter as TRUE. --- system/database/DB_forge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/database') diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index d99fd0024..865498fb5 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -239,7 +239,7 @@ abstract class CI_DB_forge { */ public function add_key($key, $primary = FALSE) { - if ($primary === TRUE && is_array($key)) + if (is_array($key)) { foreach ($key as $one) { -- cgit v1.2.3-24-g4f1b