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 
						c.serial_number,c.title,p.price ASC L' at line 10

Query: SELECT 
						p.*
					FROM 
						products as p
						LEFT JOIN 
							product_categories as c 
						ON 
							p.categories = c.id	WHERE 
						 
					GROUP BY 
						p.id 
					ORDER BY 
						c.serial_number,c.title,p.price ASC LIMIT 0,8

File: /var/www/vitsafe.com/html/core/Db.php Line: 70

Array
(
    [0] => Array
        (
            [file] => /var/www/vitsafe.com/html/classes/Products.class
            [line] => 700
            [function] => getBySql
            [class] => DB
            [type] => ->
            [args] => Array
                (
                    [0] => SELECT 
						p.*
					FROM 
						products as p
						LEFT JOIN 
							product_categories as c 
						ON 
							p.categories = c.id	WHERE 
						 
					GROUP BY 
						p.id 
					ORDER BY 
						c.serial_number,c.title,p.price ASC LIMIT 0,8
                )

        )

    [1] => Array
        (
            [file] => /var/www/vitsafe.com/html/classes/ProductsController.class
            [line] => 109
            [function] => viewRegular2
            [class] => Products
            [type] => ->
            [args] => Array
                (
                    [0] => 0
                    [1] => Array
                        (
                            [user] => 0
                            [url_data] => Array
                                (
                                    [0] => products
                                    [1] => 1-metallicheskaja-mebel
                                    [2] => choice_city
                                )

                            [get_params] => Array
                                (
                                )

                        )

                )

        )

    [2] => Array
        (
            [file] => /var/www/vitsafe.com/html/includes/App.php
            [line] => 125
            [function] => defaultAction
            [class] => ProductsController
            [type] => ->
            [args] => Array
                (
                    [0] => Array
                        (
                            [user] => 0
                            [url_data] => Array
                                (
                                    [0] => products
                                    [1] => 1-metallicheskaja-mebel
                                    [2] => choice_city
                                )

                            [get_params] => Array
                                (
                                )

                        )

                )

        )

    [3] => Array
        (
            [file] => /var/www/vitsafe.com/html/index.php
            [line] => 9
            [function] => run
            [class] => App
            [type] => ->
            [args] => Array
                (
                )

        )

)