mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
another small optimization from last fix
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7281 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
70276afa3b
commit
0fc7355e6b
2 changed files with 5 additions and 3 deletions
|
@ -500,7 +500,7 @@ class DboMysql extends DboSource {
|
|||
*/
|
||||
function index($model) {
|
||||
$index = array();
|
||||
$table = $this->fullTableName($model, false);
|
||||
$table = $this->fullTableName($model);
|
||||
if($table) {
|
||||
$indexes = $this->query('SHOW INDEX FROM ' . $table);
|
||||
$keys = Set::extract($indexes, '{n}.STATISTICS');
|
||||
|
|
|
@ -870,8 +870,10 @@ class DboSource extends DataSource {
|
|||
*/
|
||||
function fetchAssociated($model, $query, $ids) {
|
||||
$query = str_replace('{$__cakeID__$}', join(', ', $ids), $query);
|
||||
$query = str_replace('= (', 'IN (', $query);
|
||||
$query = str_replace('= (', 'IN (', $query);
|
||||
if (count($ids) > 1) {
|
||||
$query = str_replace('= (', 'IN (', $query);
|
||||
$query = str_replace('= (', 'IN (', $query);
|
||||
}
|
||||
return $this->fetchAll($query, $model->cacheQueries, $model->alias);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue