how to change color of table connected to a database using conditional statement

zbekieSma2

New Member
I want to know, How can I put conditional statement here that changes the color of the table?\[code\]$query = "SELECT s.lastname, s.firstname, s.middlename,s.student_no,c.name,g.prelim_pts,g.midterm_pts,g.finals_pts,r.prelims,r.midterms,r.finalsFROM grades g INNER JOIN students s on s.`student_no`=g.`student_no`INNER JOIN courses c on c.`cid`=s.`course_id` LEFT JOIN cirepermit ron r.`student_no`=s.`student_no` LEFT JOIN graduates q onq.`student_no`=r.`student_no` where g.school_year=(selectschool_year from adureference) and g.term=(select term fromadureference) and g.section_no='".$_GET['section_no']."'";$result = mysql_query($query); if(mysql_num_rows($result) > 0){ echo"<table border='1'>"; echo"<tr><th>student number</th>"; echo"<th>last name</th>"; echo"<th>First name</th>"; echo"<th>middle name</th>"; echo"<th>course ID</th>"; echo"<th>prelim points</th>"; echo"<th>midterm points</th>"; echo"<th>final points</th>"; ?>\[/code\]
 
Back
Top