@@ -294,7 +294,8 @@ func (this *Shop) load() *Shop {
shop_products.active = 1 AND
shop_cat_product_rel.category_id IN (` + strings.Join(cat_ids, ", ") + `)
GROUP BY
- shop_products.id
+ shop_products.id,
+ cats.parent_id
ORDER BY
shop_products.id DESC
LIMIT ?, ?;
@@ -20,7 +20,7 @@ func log(query string, s time.Time, e error, transaction bool) {
}
eStr := " (nil)"
if e != nil {
- eStr = " (" + e.Error() + ") "
+ eStr = " \033[0m\033[0;31m(" + e.Error() + ")"
if consts.IS_WIN {
fmt.Fprintln(os.Stdout, "[SQL] "+msg+eStr+fmt.Sprintf(" %.3f ms", time.Now().Sub(s).Seconds()))