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
This commit is contained in:
phpnut 2007-01-24 10:47:12 +00:00
parent 4d96ad09f1
commit ea2c7819f3
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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;