Notice: Undefined property: stdClass::$link in /var/www/medexpress/data/www/medexpress.pro/classes/ProductsController.class on line 118
Error SQL: 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 
						p.id 
					ORDER BY 
						pexist DESC, exist DESC, p.id ASC' at line 12

Query: SELECT 
						p.*,
						IF(p.stock > 0,1,0) as exist,
						IF(p.price > 0, 1, 0) AS pexist
					FROM 
						products as p
						LEFT JOIN 
							product_categories as c 
						ON 
							p.categories = c.id	WHERE 
						 
					GROUP BY 
						p.id 
					ORDER BY 
						pexist DESC, exist DESC, p.id ASC 

File: /var/www/medexpress/data/www/medexpress.pro/core/Db.php Line: 75

Array
(
    [0] => Array
        (
            [file] => /var/www/medexpress/data/www/medexpress.pro/classes/Products.class
            [line] => 711
            [function] => getBySql
            [class] => DB
            [type] => ->
        )

    [1] => Array
        (
            [file] => /var/www/medexpress/data/www/medexpress.pro/classes/ProductsController.class
            [line] => 132
            [function] => viewRegular2
            [class] => Products
            [type] => ->
        )

    [2] => Array
        (
            [file] => /var/www/medexpress/data/www/medexpress.pro/includes/App.php
            [line] => 142
            [function] => defaultAction
            [class] => ProductsController
            [type] => ->
        )

    [3] => Array
        (
            [file] => /var/www/medexpress/data/www/medexpress.pro/index.php
            [line] => 9
            [function] => run
            [class] => App
            [type] => ->
        )

)