close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Get info from 2 tables?

Thread began 1/07/2011 7:57 am by willo009412397 | Last modified 2/09/2011 3:39 pm by willo009412397 | 4807 views | 15 replies

twitchr377598

Hi willo,

A single query to get data from two tables would look something like this:

php:
"SELECT * FROM customer INNER JOIN pet ON (customer.customerID = pets.customerID)"



In the example above I am assuming your customer table is called "customer" and your pet table is called "pet". I am also assuming that the column that links the two tables together is the customerID. For instance, each pet entry has a customerID associated with it to link it to a customer.

For your second issue, your record set for the various customer back end pages needs to filter by the customerID.

For instance it may look something like:

php:
"SELECT * FROM customer WHERE customerID = '1'"



Of course there are many ways to get the customerID dynamically via either a POST from a form or GET from a form or a session variable etc. I believe by default dataassist uses GET. So in Dreamweaver for your recordset you would use a setting of: "Filter by customerID using URL = customerID"

-Twitch

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

Content

rating

Layout

rating

Ease of use

rating

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...