Я пытаюсь получить данные из нескольких рассказов, используя LEFT OUTER JOIN, но я получаю фатальную ошибку.
Имена таблиц, имена полей, соединения db правильны.
$sql = "SELECT shipping_info.shipping_id, service1.service, package1.package_type, countries1.country AS fromCountry, countries2.country AS toCountry, countries3.country AS resiCountry, customer1.name, FROM shipping_info LEFT OUTER JOIN service_types AS service1 ON shipping_info.service_type = service_types.serviceType_id LEFT OUTER JOIN package_types AS package1 ON shipping_info.package_type = package_types.packageType_id LEFT OUTER JOIN customer_info AS customer1 ON shipping_info.customer_id = customer_info.customer_id LEFT OUTER JOIN countries AS countries1 ON shipping_info.from_loc = countries1.country_id LEFT OUTER JOIN countries AS countries2 ON shipping_info.to_loc= countries2.country_id LEFT OUTER JOIN countries AS countries3 ON shipping_info.to_id = countries3.country_id ORDER BY shipping_info.order_date DESC";
Неустранимая ошибка : вызовите функцию-член fetchAll () для объекта без объекта ….