database - mysql query 3 tables -
i'm messing around mysql query on 3 tables , and cant work.
the situation: have 3 tables.
now try make mysql query based on inputfield, put in "oxid" table "oxarticles" , result should be, articles category article/oxid put in inputfield.
example: put "oxid" 2 in inputfield , press submit , result should looks this:
lenkrad reifen sitz
i tried lot never come close to. made day before query show me categories based on article cant modified , used actual problem.
i hope guys can me :)
thats far, think not close cause white page.
$result = mysql_query("select distinct oxtitle oxarticles inner join oxobject2category b on a.oxid = b.oxobjectid b.oxcatnid in (select oxcatnid oxobject2category oxobjectid = 2)") or die(mysql_error()); ;
now got it:
the follow querys work:
select distinct oxtitle oxarticles inner join oxobject2category b on a.oxid = b.oxobjectid b.oxcatind in (select oxcatind oxobject2category oxobjectid = 2
and 1 also:
select distinct a.oxtitle oxarticles a, oxobject2category oc a.oxid = oc.oxobjectid , oxcatind in (select oxcatind oxobject2category oxobjectid=2
thank :)
Comments
Post a Comment