News

Log In Sponsors
Partner Sites

Re: What's the best way to go about this?



The easiest way would be to change it in to three separate queries:[code:1vg84xsx]$query = "SELECT cont_id, cont_title, cont_sec, cont_sec2 FROM article WHERE cont_sec = 'Photoshop' AND cont_sec2 = 'Beginner'"; $result= mysql_query($query); while($row=mysql_fetch_array($result, MYSQL_ASSOC)) { //echo beginner articles } $query = "SELECT cont_id, cont_title, cont_sec, cont_sec2 FROM article WHERE cont_sec = 'Photoshop' AND cont_sec2 = 'Intermediate'"; $result= mysql_query($query); while($row=mysql_fetch_array($result, MYSQL_ASSOC)) { //echo intermediate articles } $query = "SELECT cont_id, cont_title, cont_sec, cont_sec2 FROM article WHERE cont_sec = 'Photoshop' AND cont_sec2 = 'Advanced'"; $result= mysql_query($query); while($row=mysql_fetch_array($result, MYSQL_ASSOC)) { //echo advanced articles } [/code:1vg84xsx]That should achieve something like what your looking for. Flabby Rabbit

Click here to read the whole forum topic