From c4ec46eae4564a5918bb43319e716d6fa655ac7f Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Thu, 2 May 2013 11:59:43 -0400 Subject: [PATCH] Fix sql tests? --- classes/query_builder.php | 4 +++- tests/core/db_qb_test.php | 6 +++--- tests/db_files/FB_TEST_DB.FDB | Bin 802816 -> 802816 bytes 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/classes/query_builder.php b/classes/query_builder.php index 55b9997..d397a8f 100644 --- a/classes/query_builder.php +++ b/classes/query_builder.php @@ -1039,9 +1039,11 @@ class Query_Builder implements iQuery_Builder { // Can't use normal set, because it doesn't handle multidimensional arrays foreach($data as $key => $arr) { + $this->set_array_keys[$key] = array(); + foreach($arr as $k => $v) { - $this->set_array_keys[$key][] = $k; + array_push($this->set_array_keys[$key], $k); $this->values[] = $v; } diff --git a/tests/core/db_qb_test.php b/tests/core/db_qb_test.php index fc0d683..95e94ed 100644 --- a/tests/core/db_qb_test.php +++ b/tests/core/db_qb_test.php @@ -465,17 +465,17 @@ abstract class QBTest extends UnitTestCase { $insert_array = array( array( - 'id' => 6, + 'id' => 11, 'key' => 2, 'val' => 3 ), array( - 'id' => 5, + 'id' => 12, 'key' => 6, 'val' => 7 ), array( - 'id' => 8, + 'id' => 13, 'key' => 1, 'val' => 2 ) diff --git a/tests/db_files/FB_TEST_DB.FDB b/tests/db_files/FB_TEST_DB.FDB index 8de1c33324aff88fc27bf078d6b5a2dddb930523..bf1e5696a6bd1c99a14d7844e455934f86d31877 100755 GIT binary patch delta 2021 zcmb7_O=uHA6vy9ev$owylWFTA*jkb%ZPG7np(0{IbLyc+8#G8Np$)cpP+E+FN0Yi; zOD$MYn1fgGQD}>|hj5hoi6%?1vA*4)_&{!&ER12ZJg2$>Z=6eY5EM$Oqst zj;YyJ2fVdX@?DwtjC8o@p{|+<0syy2TQITX(>0-Z_4>-m_XXLx&J*&-ZJuQFGF#z& zrb!d!q|Kx00?vAkmVt9vs|(r=kd1HEHdzd&OZjR%twF2h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