array_merge - [internal], line ??
SearchCommonComponent::search() - APP/controllers/components/search_common.php, line 77
SearchController::index() - APP/controllers/search_controller.php, line 20
Object::dispatchMethod() - CORE/cake/libs/object.php, line 116
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
[main] - APP/webroot/index.php, line 88
Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by g.id order by total_stock desc limit 0, 50' at line 12 [CORE/cake/libs/model/datasources/dbo_source.php, line 525]
$sql = "
select
g.*,
sum(stock) as total_stock,
group_concat(distinct i.color) as color,
group_concat(distinct i.color_map) as color_map,
group_concat(distinct i.size order by i.size) as size,
group_concat(distinct i.price order by i.price) as price,
group_concat(distinct i.image1) as image1,
group_concat(distinct case when i.price < i.fixed_price then 1 else 0 end) as is_sale
from groups as g inner join items i on g.id = i.group_id
where 1=1
and g.maker in ('長靴') and g.category1 = '衛生・耐油長靴' and g.category2 = group by g.id order by total_stock desc limit 0, 50"
$error = "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by g.id order by total_stock desc limit 0, 50' at line 12"
$out = null
DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 525
DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 201
DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 336
DboSource::query() - CORE/cake/libs/model/datasources/dbo_source.php, line 297
AppModel::query() - APP/models/app_model.php, line 13
Group::getSearch() - APP/models/group.php, line 29
SearchCommonComponent::search() - APP/controllers/components/search_common.php, line 165
SearchController::index() - APP/controllers/search_controller.php, line 20
Object::dispatchMethod() - CORE/cake/libs/object.php, line 116
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
[main] - APP/webroot/index.php, line 88
Query:
select
g.*,
sum(stock) as total_stock,
group_concat(distinct i.color) as color,
group_concat(distinct i.color_map) as color_map,
group_concat(distinct i.size order by i.size) as size,
group_concat(distinct i.price order by i.price) as price,
group_concat(distinct i.image1) as image1,
group_concat(distinct case when i.price < i.fixed_price then 1 else 0 end) as is_sale
from groups as g inner join items i on g.id = i.group_id
where 1=1
and g.maker in ('長靴') and g.category1 = '衛生・耐油長靴' and g.category2 = group by g.id order by total_stock desc limit 0, 50