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 Quote Link to comment Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 8, 2008 Share Posted April 8, 2008 $sql = "SELECT * FROM pick AS p, table2 AS t ORDER BY pick.name ASC"; Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.