Exception Object
(
    [message:protected] => 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 'ORDER BY category_sort_order ASC' at line 1
    [string:Exception:private] => 
    [code:protected] => 0
    [file:protected] => /var/www/erp/erp/admin/include/functions.inc.php
    [line:protected] => 592
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/dbmysql.inc.php
                    [line] => 146
                    [function] => t_ex
                    [args] => Array
                        (
                            [0] => 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 'ORDER BY category_sort_order ASC' at line 1
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 3350
                    [function] => query
                    [class] => DB
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT *,(SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons,(SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name,(SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url,(SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title,(SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name,(SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description,(SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text,(SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover,(SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls,(SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children FROM category c WHERE c.category_deleted = 0 AND category_id =    ORDER BY category_sort_order ASC
                        )

                )

            [2] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 3404
                    [function] => qa
                    [args] => Array
                        (
                            [0] => SELECT *,(SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons,(SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name,(SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url,(SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title,(SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name,(SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description,(SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text,(SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover,(SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls,(SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children FROM category c WHERE c.category_deleted = 0 AND category_id =    ORDER BY category_sort_order ASC
                            [1] => 1
                        )

                )

            [3] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 2538
                    [function] => query
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [select] => Array
                                        (
                                            [0] => *
                                            [1] => (SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons
                                            [2] => (SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name
                                            [3] => (SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url
                                            [4] => (SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title
                                            [5] => (SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name
                                            [6] => (SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description
                                            [7] => (SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products
                                            [8] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text
                                            [9] => (SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover
                                            [10] => (SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping
                                            [11] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children
                                            [12] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls
                                            [13] => (SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children
                                        )

                                    [from] => Array
                                        (
                                            [0] => category c
                                        )

                                    [where] => Array
                                        (
                                            [0] => c.category_deleted = 0
                                            [1] => category_id = 
                                        )

                                    [order_by] => Array
                                        (
                                            [0] => category_sort_order ASC
                                        )

                                )

                            [1] => 1
                        )

                )

            [4] => Array
                (
                    [file] => /var/www/erp/erp/brandimarte/pag_prodotti.php
                    [line] => 25
                    [function] => get_categories
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [where] => Array
                                        (
                                            [category_id] => 
                                        )

                                )

                        )

                )

        )

    [previous:Exception:private] => 
)
Exception Object
(
    [message:protected] => 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 'ORDER BY category_sort_order ASC' at line 1
    [string:Exception:private] => 
    [code:protected] => 0
    [file:protected] => /var/www/erp/erp/admin/include/functions.inc.php
    [line:protected] => 592
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/dbmysql.inc.php
                    [line] => 146
                    [function] => t_ex
                    [args] => Array
                        (
                            [0] => 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 'ORDER BY category_sort_order ASC' at line 1
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 3350
                    [function] => query
                    [class] => DB
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT *,(SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons,(SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name,(SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url,(SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title,(SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name,(SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description,(SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text,(SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover,(SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls,(SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children FROM category c WHERE c.category_deleted = 0 AND category_id =    ORDER BY category_sort_order ASC 
                        )

                )

            [2] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 3416
                    [function] => qa
                    [args] => Array
                        (
                            [0] => SELECT *,(SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons,(SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name,(SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url,(SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title,(SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name,(SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description,(SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text,(SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover,(SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls,(SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children FROM category c WHERE c.category_deleted = 0 AND category_id =    ORDER BY category_sort_order ASC 
                            [1] => 1
                        )

                )

            [3] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 2538
                    [function] => query
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [select] => Array
                                        (
                                            [0] => *
                                            [1] => (SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons
                                            [2] => (SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name
                                            [3] => (SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url
                                            [4] => (SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title
                                            [5] => (SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name
                                            [6] => (SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description
                                            [7] => (SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products
                                            [8] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text
                                            [9] => (SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover
                                            [10] => (SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping
                                            [11] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children
                                            [12] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls
                                            [13] => (SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children
                                        )

                                    [from] => Array
                                        (
                                            [0] => category c
                                        )

                                    [where] => Array
                                        (
                                            [0] => c.category_deleted = 0
                                            [1] => category_id = 
                                        )

                                    [order_by] => Array
                                        (
                                            [0] => category_sort_order ASC
                                        )

                                )

                            [1] => 1
                        )

                )

            [4] => Array
                (
                    [file] => /var/www/erp/erp/brandimarte/pag_prodotti.php
                    [line] => 25
                    [function] => get_categories
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [where] => Array
                                        (
                                            [category_id] => 
                                        )

                                )

                        )

                )

        )

    [previous:Exception:private] => 
)
Exception Object
(
    [message:protected] => 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 'ORDER BY category_sort_order ASC' at line 1
    [string:Exception:private] => 
    [code:protected] => 0
    [file:protected] => /var/www/erp/erp/admin/include/functions.inc.php
    [line:protected] => 592
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/dbmysql.inc.php
                    [line] => 146
                    [function] => t_ex
                    [args] => Array
                        (
                            [0] => 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 'ORDER BY category_sort_order ASC' at line 1
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 3350
                    [function] => query
                    [class] => DB
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT *,(SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons,(SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name,(SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url,(SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title,(SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name,(SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description,(SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text,(SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover,(SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls,(SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children FROM category c WHERE c.category_deleted = 0 AND category_id =    ORDER BY category_sort_order ASC
                        )

                )

            [2] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 3404
                    [function] => qa
                    [args] => Array
                        (
                            [0] => SELECT *,(SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons,(SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name,(SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url,(SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title,(SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name,(SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description,(SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text,(SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover,(SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls,(SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children FROM category c WHERE c.category_deleted = 0 AND category_id =    ORDER BY category_sort_order ASC
                            [1] => 1
                        )

                )

            [3] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 2538
                    [function] => query
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [select] => Array
                                        (
                                            [0] => *
                                            [1] => (SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons
                                            [2] => (SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name
                                            [3] => (SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url
                                            [4] => (SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title
                                            [5] => (SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name
                                            [6] => (SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description
                                            [7] => (SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products
                                            [8] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text
                                            [9] => (SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover
                                            [10] => (SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping
                                            [11] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children
                                            [12] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls
                                            [13] => (SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children
                                        )

                                    [from] => Array
                                        (
                                            [0] => category c
                                        )

                                    [where] => Array
                                        (
                                            [0] => c.category_deleted = 0
                                            [1] => category_id = 
                                        )

                                    [order_by] => Array
                                        (
                                            [0] => category_sort_order ASC
                                        )

                                )

                            [1] => 1
                        )

                )

            [4] => Array
                (
                    [file] => /var/www/erp/erp/brandimarte/pag_prodotti.php
                    [line] => 30
                    [function] => get_categories
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [where] => Array
                                        (
                                            [category_id] => 
                                        )

                                )

                        )

                )

        )

    [previous:Exception:private] => 
)
Exception Object
(
    [message:protected] => 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 'ORDER BY category_sort_order ASC' at line 1
    [string:Exception:private] => 
    [code:protected] => 0
    [file:protected] => /var/www/erp/erp/admin/include/functions.inc.php
    [line:protected] => 592
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/dbmysql.inc.php
                    [line] => 146
                    [function] => t_ex
                    [args] => Array
                        (
                            [0] => 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 'ORDER BY category_sort_order ASC' at line 1
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 3350
                    [function] => query
                    [class] => DB
                    [type] => ->
                    [args] => Array
                        (
                            [0] => SELECT *,(SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons,(SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name,(SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url,(SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title,(SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name,(SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description,(SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text,(SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover,(SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls,(SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children FROM category c WHERE c.category_deleted = 0 AND category_id =    ORDER BY category_sort_order ASC 
                        )

                )

            [2] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 3416
                    [function] => qa
                    [args] => Array
                        (
                            [0] => SELECT *,(SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons,(SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name,(SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url,(SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title,(SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name,(SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description,(SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text,(SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover,(SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children,(SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls,(SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children FROM category c WHERE c.category_deleted = 0 AND category_id =    ORDER BY category_sort_order ASC 
                            [1] => 1
                        )

                )

            [3] => Array
                (
                    [file] => /var/www/erp/erp/admin/include/functions.inc.php
                    [line] => 2538
                    [function] => query
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [select] => Array
                                        (
                                            [0] => *
                                            [1] => (SELECT COUNT(*) as count_sons FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_sons
                                            [2] => (SELECT text_value FROM text WHERE text_type = 'product_category_name' AND text_id = c.category_id AND lang_id = '1') as name
                                            [3] => (SELECT text_value FROM text WHERE text_type = 'product_category_friendly_url' AND text_id = c.category_id AND lang_id = '1') as friendly_url
                                            [4] => (SELECT text_value FROM text WHERE text_type = 'product_category_meta_title' AND text_id = c.category_id AND lang_id = '1') as meta_title
                                            [5] => (SELECT text_value FROM text WHERE text_type = 'product_category_public_name' AND text_id = c.category_id AND lang_id = '1') as public_name
                                            [6] => (SELECT text_value FROM text WHERE text_type = 'product_category_description' AND text_id = c.category_id AND lang_id = '1') as description
                                            [7] => (SELECT COUNT(*) as count_products FROM product_category cc WHERE cc.category_id = c.category_id) as count_products
                                            [8] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_type,'___',text_value) SEPARATOR '---') FROM text t WHERE t.text_id = c.category_id AND text_context = 'category' GROUP BY text_id ) as text
                                            [9] => (SELECT GROUP_CONCAT(CONCAT(f.file_id,'§',f.formats) SEPARATOR '-') FROM file f WHERE f.file_id = c.file_id) as cover
                                            [10] => (SELECT CONCAT(category_google_shopping_id,'§',category_google_shopping_name) FROM category_google_shopping cgs WHERE cgs.category_google_shopping_id = c.category_google_shopping_id) as category_google_shopping
                                            [11] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',text_id,'___', text_value) SEPARATOR '---') FROM text t LEFT JOIN category cat ON t.text_id = cat.category_id WHERE t.text_type = 'product_category_name' AND cat.parent_category_id = c.category_id GROUP BY cat.parent_category_id) as first_level_children
                                            [12] => (SELECT GROUP_CONCAT(CONCAT(lang_id,'___',supplier_id,'___',url_value) SEPARATOR '---') FROM url u WHERE u.url_id = c.category_id AND u.url_type = 'category' AND u.supplier_id IS NOT NULL GROUP BY url_id) as urls
                                            [13] => (SELECT COUNT(*) FROM category c2 WHERE c2.parent_category_id = c.category_id) as count_children
                                        )

                                    [from] => Array
                                        (
                                            [0] => category c
                                        )

                                    [where] => Array
                                        (
                                            [0] => c.category_deleted = 0
                                            [1] => category_id = 
                                        )

                                    [order_by] => Array
                                        (
                                            [0] => category_sort_order ASC
                                        )

                                )

                            [1] => 1
                        )

                )

            [4] => Array
                (
                    [file] => /var/www/erp/erp/brandimarte/pag_prodotti.php
                    [line] => 30
                    [function] => get_categories
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [where] => Array
                                        (
                                            [category_id] => 
                                        )

                                )

                        )

                )

        )

    [previous:Exception:private] => 
)

Codice prodotto:
Sei interessato a questo oggetto?    Contattaci


Sei interessato ai prodotti Brandimarte?
Contattaci ai seguenti recapiti

I nostri contatti

+39 3494220269

info@brandimarte.com

(*) Campo necessario

Suggerisci questo oggetto ad un tuo amico o condividilo sulla tua pagina