From af36429342b48bd45f54d815d398a1270aeb5266 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Doyle Date: Thu, 22 Sep 2011 21:06:53 -0400 Subject: [PATCH] Fix to defect model virtualfields with mysqli Refs #2017 --- cake/libs/model/datasources/dbo/dbo_mysqli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/model/datasources/dbo/dbo_mysqli.php b/cake/libs/model/datasources/dbo/dbo_mysqli.php index c71ee91c1..8002b5c3e 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysqli.php +++ b/cake/libs/model/datasources/dbo/dbo_mysqli.php @@ -269,7 +269,7 @@ class DboMysqli extends DboMysqlBase { $j = 0; while ($j < $numFields) { $column = mysqli_fetch_field_direct($results, $j); - if (!empty($column->table)) { + if (!empty($column->table) && strpos($column->name, $this->virtualFieldSeparator) === false) { $this->map[$index++] = array($column->table, $column->name); } else { $this->map[$index++] = array(0, $column->name);