hi guys im a student studying sql and php
im wondering how to Grab data from one table and inserting it into another table
i have already made a code that displays student order by average desc
here is my code
[php]$i = 1;
while($row = mysql_fetch_assoc($result)) {
echo “
$sql = mysql_query("CREATE TABLE section(studentID int, lastname text, firstname text)");
// end and create a new table every 2 rows
if ($i % 2 === 0) {
echo "</table>";
echo "<table cellpadding=2 border=1><tr><td>StudentID</td><td>Name</td><td>average</td><td>date</td></tr><br />";
}
$i++;
}[/php]