From ea2c7819f3fdb509485fb6de514083bfcd2ef4de Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 24 Jan 2007 10:47:12 +0000 Subject: [PATCH] Fixing error introduced in [4311] the DboSource::limit() does not return results as expected. When column is tinyint(1) is $limit = LIMIT tinyint(1). All others are similar result with $limit = LIMIT [column type][#] git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4328 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo/dbo_mysql.php | 4 ++-- cake/libs/model/model.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/cake/libs/model/datasources/dbo/dbo_mysql.php index d405aa1d4..2284e56b3 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysql.php +++ b/cake/libs/model/datasources/dbo/dbo_mysql.php @@ -365,8 +365,8 @@ class DboMysql extends DboSource { } $col = r(')', '', $real); - $limit = $this->limit($real); - @list($col) = explode('(', $col); + $limit = null; + @list($col, $limit) = explode('(', $col); if (in_array($col, array('date', 'time', 'datetime', 'timestamp'))) { return $col; diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index ecb3fd669..9fc59266c 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -484,7 +484,7 @@ class Model extends Overloadable { * @return void */ function bind($assoc, $params, $permanent = true) { - + } /** * Bind model associations on the fly. @@ -1516,7 +1516,7 @@ class Model extends Overloadable { $value = null; } } - + if (strpos($field, '.') === false) { unset($fields[$field]); $fields[$this->name . '.' . $field] = $value;