Hello, a noob in web programming here. Doing some course related database, would appreciate any help :), I want to ask whether any of you can help me on how to retrieve get data from mysql using php function, but separate each data from mysql one by one, cause i want the query done by my php function be a draggable object, my function look like this:
<?php
$q=$_GET["q"];
$sql_fundamental_g= "SELECT mf_mname, mfg_group_name, credits
FROM major_fundamental_g, major_fundamental, course, course_group
WHERE mf_mname = '".$q."'
AND mfname = mfg_mfname
AND course_group_name = mfg_group_name
AND course_group_name = code";
$result = mysql_query($sql_fundamental_g);
echo "<b>Major Fundamental Courses</b><br>";
echo "<br><br>Student who major in ".$q." should take all of the following :<br>";
echo "<table border='1'>
<tr>
<th>Major</th>
<th>code</th>
<th>credits</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['mf_mname'] . "</td>";
echo "<td>" . $row['mfg_group_name'] . "</td>";
echo "<td>" . $row['credits'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
and in this result i get the whole table, but i'm wondering if i can generate row by row ,cause i wanna use each row as separate entity and make them a draggable object using ajax later on
Thanks a lot :)