close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Trying to join the order table and order detail together on the detail page

Thread began 2/03/2010 11:50 am by sturgisk383938 | Last modified 2/04/2010 9:51 am by sturgisk383938 | 1874 views | 3 replies


Join statement might not be correct !

Hi there

I am asuming you are using dreamweaver and you are connecting to a mysql database.

i do not know what you database erd and structure looks like but looking at your join statement I noticed this:

"SELECT orders.*, orderdetails.*
FROM orders INNER JOIN orderdetails ON orders.OrderID = orderdetails.DetailsOrderID"

1. You joining primary Key with primary key of another table !Wrong !
2. I think you should try to clean up your statement to look like this below.

Select * from Orders INNER JOIN OrderDetails ON
orders.OrderID = orderdetails.OrderID (you could also leave out INNER for now)

Leave out the where clause for now just to get your join to work !!!

Now what I would reccomend is open dreamweaver ...

1. Create a connection.
2. Create a recordset and in the dialogue copy and paste the join statement that I gave you ***INTO THE SQL TEXT BOX THAT IS THERE ***and click test ! If it works then you will actually see all the fields in both tables ...! Else it will tell you that you have a syntax error.

If that is the case I suggest you examine your ERD carefully to see that the PK OrderId is actullay refencing the OrderDetails Table as ForeignKey !

I hope this will be of some help !!! Let me know !

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...