fivestringsurf Posted February 22, 2010 Share Posted February 22, 2010 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] Quote Link to comment https://forums.phpfreaks.com/topic/192885-conditional-querytrouble-getting-results/ Share on other sites More sharing options...
fenway Posted February 23, 2010 Share Posted February 23, 2010 I don't see a query anywhere. Quote Link to comment https://forums.phpfreaks.com/topic/192885-conditional-querytrouble-getting-results/#findComment-1016925 Share on other sites More sharing options...
fivestringsurf Posted February 28, 2010 Author Share Posted February 28, 2010 i got the job done...it's just one of those long solutions... output from db->do some php checking and routing the next query -> more output from db. it's like 50 lines of eye soreness so i won't even bother posting it. Quote Link to comment https://forums.phpfreaks.com/topic/192885-conditional-querytrouble-getting-results/#findComment-1019160 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.