close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Many to many relationship

Thread began 12/17/2011 7:49 am by steelace396915 | Last modified 12/21/2011 1:22 am by steelace396915 | 1236 views | 4 replies

Jason ByrnesWebAssist

well, the example i gave you _is_ using the linking table, but you dont need the data from all three tables to return the files that are associated to the users. you only need to use the linking table and the media table.

also bear in mind, that the recordset code i gave is not exact, you need to modify it based on your table and column names (This is info I dont have so cant give you exact SQL syntax).

assuming you have a users table, media table and usersmedia (the linking table) with the following basic structure:

userID - primaryKey

mediaID - primary KEY

usermediaID - primary key
usermediaUserID - relates to users.userID
usermediaMediaID - relates to media.mediaID

you can use the following SQL:
SELECT media.*
FROM media
INNER JOIN usermedia.usermediaMediaID =
WHERE usermedia.usermediaUserID = paramUID

I would recommend getting some books from the local bookstore on the MySQL Subject to become a little more familiar with this subject matter, there is only so much the internet can teach you.

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