Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- simple sql left join problem


snehula - 3:29 pm on Jun 13, 2011 (gmt 0)


Can anybody see why I'm getting the error:
#1064 - 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 LEFT JOIN product ON order.idProduct = product.idProduct WHERE order.idCus' at line 1


with the following query:

SELECT product.product_name, product.product_type, order.order_status, order.order_date, order.order_desc
FROM order LEFT JOIN product ON order.idProduct = product.idProduct
WHERE order.idCustomer = 21
ORDER BY order.order_date


when all the field names and table names are right?


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4325504.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com