hi guys im a student studying php and sql
In my code i am able to display data and add new table for every 2 data.
here is the code:
[php]$query = “SELECT * FROM student ORDER BY average DESC”;
$result = mysql_query($query);
$num = mysql_numrows($result);
echo “
StudentID | Name | average | Date |
” . $row[‘studentID’] . “ | ” . $row[‘lastname’] . ", " . $row[‘firstname’] . “ | ” . $row[‘average’] . “ | ” . $row[‘date’] . “ |
here is the output of my code:
StudentID Name average Date
2 dela cruz, juan 89.56 2013-02-07 05:28:42
6 dela pena, miggel 88.00 2013-02-09 04:10:10
StudentID Name average date
5 baltazar, sarah 87.45 2013-02-09 06:15:16
3 cruz, pedro 86.56 2013-02-09 07:16:26
StudentID Name average date
4 abanto, nicolas 83.56 2013-02-09 04:10:28
1 acebuche, joseph lance 80.56 2013-02-09 01:28:33
StudentID Name average date