Jump to content

Recommended Posts

table: tutorial

| tut_id | con_id | med_id |

 

table: medium

| med_id | parent_id | medium |

 

table: content

| con_id | content |

 

I'm trying to return the [content] fields from the table: contentafter being given the value of [medium] from the table: medium.

 

*Notice a "medium" can be a parent value or a child value in that table. (this is causing a problem)

As a result I need away to figure out if [medium] is a parent or child...

...then trace it's value back to table:tutorial....

find all the con_id's there...link them up with the table:content...

and return all [content] values.

 

i know how it should work ( i think i explained it ok..?) and i think i wrote the db with referential fidelity :)

I've tried sub-queries, inner joins, grouping, and some realy ugly mixing of php and mysql.

I'm certain an expert here will have some advice for me.

 

I'm using mysql 5

i've attached a dump of the db

 

Thank you.

 

 

[attachment deleted by admin]

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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