Added left join in products table, but getting error "Service Enable" and check the logs missing half table name but, output correctly displayed in phpmyadmin. I don't know "How making a mistake and fix it".
Query:
$join .= db_quote("SELECT * FROM ?:offline_sale LEFT JOIN ?:products ON ?:offline_sale.product_id = ?:products.product_id WHERE offline_type ='D'");
Error:-
Error: 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 'SELECT * FROM cscart_offline_sale LEFT JOIN cscart_products ON cscart_offline_sa' at line 1 (1064)
Query: SELECT SQL_CALC_FOUND_ROWS products.product_id, descr1.product as product, companies.company as company_name, cscart_supplier_links.supplier_id FROM cscart_products as products LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'en' LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 LEFT JOIN cscart_companies AS companies ON companies.company_id = products.company_id INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id AND (cscart_categories.usergroup_ids = '' OR FIND_IN_SET(0, cscart_categories.usergroup_ids) OR FIND_IN_SET(1, cscart_categories.usergroup_ids)) AND cscart_categories.status IN ('A', 'H') LEFT JOIN cscart_supplier_links ON cscart_supplier_links.object_id = products.product_id AND cscart_supplier_links.object_type = 'P' SELECT * FROM cscart_offline_sale LEFT JOIN cscart_products ON cscart_offline_sale.product_id = cscart_products.product_id WHERE offline_type = D WHERE 1 AND cscart_categories.category_id IN (2095, 176, 175, 185, 186, 202, 187, 188, 189, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 285, 286, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 404, 405, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 1670, 1671, 1672, 1673, 1674, 1675, 2360, 2361) AND companies.status = 'A' AND (products.usergroup_ids = '' OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND products.status IN ('A') AND prices.usergroup_id IN (0, 0, 1) GROUP BY products.product_id ORDER BY products_categories.position asc, product_id ASC LIMIT 0, 20