nec9716 Posted April 8, 2008 Share Posted April 8, 2008 how can I show in a form data come from 2 different table? what I have presently: $sql = "SELECT * FROM pick ORDER BY pick.name ASC"; $rows = mysql_fetch_array($result) $qpname = $rows['name']; $qdriver1 = $rows['driver1']; echo "<tr style='background-color:$bgcolor;'> <td ><a href='".$_SERVER['PHP_SELF']."?id=$id'>$qpname</a></td> <td >$qdriver1</td> </tr>";$id = $rows['id']; so how can I do to have data from another table ? thank to all have a great night but I need to show data come from Link to comment https://forums.phpfreaks.com/topic/100225-how-can-i-show-data-from-2-different-table/ Share on other sites More sharing options...
Guest Posted April 8, 2008 Share Posted April 8, 2008 $sql = "SELECT * FROM pick AS p, table2 AS t ORDER BY pick.name ASC"; Link to comment https://forums.phpfreaks.com/topic/100225-how-can-i-show-data-from-2-different-table/#findComment-512493 Share on other sites More sharing options...
nec9716 Posted April 8, 2008 Author Share Posted April 8, 2008 do I have to set variable for p and t? Link to comment https://forums.phpfreaks.com/topic/100225-how-can-i-show-data-from-2-different-table/#findComment-512494 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.