LEFT OUTER JOIN을 사용하여 여러 이야기에서 데이터를 가져 오려고하는데 치명적인 오류가 발생합니다.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";
치명적인 오류 : 나는 MySQL의 전문가가 아니에요에서 ....
즉, 쿼리가 데이터를 반환하지 않으므로 개체가 아닙니다. PHP 외부에서 쿼리를 실행할 수 있습니까? –
감사합니다. 미안 PHP 밖에서 무엇을 의미합니까? – Fergoso
comnmand-line 또는 IDE를 통해 쿼리를 실행할 수 있습니까? –