Jump to content

[SOLVED] record set problem


jim.davidson

Recommended Posts

I'm running mySQL 4.1.21 PHP and Dreamweaver

 

I have three tables

orders - customers – manufacturers

 

Two variables

$confirmation_id - $customer_id

 

I need a record set that contains

orders.order_date

orders.received_date

orders.updated_date

orders.received_by

orders.destroyed_by

orders.model_number

orders.serial_number

orders.capacity

orders.confirmation_id

customers.contact_name

customers.contact_phone

manufacturers.manufacture_name

When I run my query i get this 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 'JOIN manufacturers on orders.manufacturer_id=manufacturers.manufacturer_id WHERE' at line 3

 

Here's the query:

 

SELECT orders.order_date, orders.received_date, orders.updated_date,orders.received_by,orders.destroyed_by,orders.model_number, orders.serial_number, orders.capacity, orders.confirmation_id, customers.contact_name, customers.contact_phone, manufacturers.manufacture_name FROM orders

LEFT JOIN customers on orders.customer_id = $customer_id

LEFT JOIN manufacturers on orders.manufacturer_id=manufacturers.manufacturer_id WHERE orders.confirmation_id =$confirmation_id",

 

 

Any idea what's wrong?

 

Link to comment
https://forums.phpfreaks.com/topic/49354-solved-record-set-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.