From 4003718f35247ef9b4a8d678389bda639677bac7 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 11 Oct 2006 19:16:58 +0000 Subject: --- system/libraries/Table.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'system/libraries/Table.php') diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 0f2c49d96..61d04eef5 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -211,9 +211,13 @@ class CI_Table { } // Next blast through the result array and build out the rows - foreach ($query->result_array() as $row) + + if ($query->num_rows() > 0) { - $this->rows[] = $row; + foreach ($query->result_array() as $row) + { + $this->rows[] = $row; + } } } -- cgit v1.2.3-24-g4f1b