diff options
author | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-04-02 19:25:36 +0300 |
---|---|---|
committer | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-04-02 19:25:36 +0300 |
commit | 1a57f4905f177e470cdf320ac46ca1f28fafcc6d (patch) | |
tree | 64001578240458e12b139d08b06edabc264d37b1 /codebase/db_phpcake.php | |
parent | 78660bfd59bb74c957f04f844eae325c2842de98 (diff) | |
download | connector-php-1a57f4905f177e470cdf320ac46ca1f28fafcc6d.zip connector-php-1a57f4905f177e470cdf320ac46ca1f28fafcc6d.tar.gz connector-php-1a57f4905f177e470cdf320ac46ca1f28fafcc6d.tar.bz2 |
[add] ability to use native cakephp collection filtering
Diffstat (limited to 'codebase/db_phpcake.php')
-rw-r--r-- | codebase/db_phpcake.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/codebase/db_phpcake.php b/codebase/db_phpcake.php index 980c9c3..97d94eb 100644 --- a/codebase/db_phpcake.php +++ b/codebase/db_phpcake.php @@ -13,7 +13,12 @@ if you plan to use it for Oracle - use Oracle connection type instead **/ class PHPCakeDBDataWrapper extends ArrayDBDataWrapper{ public function select($sql){ - $res = $this->connection->find("all"); + $source = $sql->get_source(); + if (is_array($source)) //result of find + $res = $source; + else + $res = $this->connection->find("all"); + if (sizeof($res)){ $name = get_class($this->connection); $temp = array(); |