1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

update multiple field

Discussion in 'MySQL' started by che_anj, Feb 12, 2008.

  1. che_anj

    che_anj New Member

    Joined:
    Feb 12, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    hello.. just wanna ask some help..


    i have a tables such as prospectus, tempevaluation, subject.

    in prospectus theres a field such as (subcode, prosno,yrlevel,term)
    in tempevaluation(subcode,grade,prosno)
    in subject (subcode,units,description)

    first, I would like to query all subcode,grade,units,description from tempevaluation, subject

    $query="select s.subcode,s.description,s.units,t.grade from tempevaluation t, subject s where t.prosno='121' and s.subcode=t.subcode and t.yrlevel='I' and t.term='1st' ";

    the result will display the subcode, description, units and grade..

    now, if in the table tempevaluation has only subjects from yearlevel (ist) and term=(1st) and I would like to display the other subject to from prospectus from 1st year to 4th year without grade coz the grades only found in the tempevaluation.. How do i make the query..

    that would display as the format of prospectus

    ex..
    first Year
    1st semester
    1.00 math 112 algebra
    2.00 engl 111 english commu


    first year
    2nd semester
    _____ IT 11 Intro to IT
    _____ IT 12 programing

    Second year

    til 4yr

    anyone could help.. thanks..
     
  2. che_anj

    che_anj New Member

    Joined:
    Feb 12, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    ooppsss sorry i got the wrong subject.. its update multiple.. but its about querying
     

Share This Page