schaaij Posted March 4, 2010 Share Posted March 4, 2010 I've got the code as seen below, what I would like is to get numbers in front of the names you see. So I can easily see how many contenders have entered the tournament. I just can't seem to find how to do it. I'm a complete newbie. This is the output link http://www.dikkewille.nl/index.php?option=com_jumi&fileid=11&Itemid=70 And this is the code: $query="SELECT record, value FROM `jos_facileforms_subrecords` WHERE title='Voornaam'"; $query2="SELECT record, value FROM `jos_facileforms_subrecords` WHERE title='Achternaam'"; $query3="SELECT record, value FROM `jos_facileforms_subrecords` WHERE title='Woonplaats'"; echo '<b>Deelneemerslijst Snikke Open 2010</b>'; echo '<br>'; echo '<br>'; echo '<table border=1>'; echo '<tr>td>Voornaam</td><td>Achternaam</td><td>Woonplaats</td></tr>'; echo '<td width=100>'; if (!($temp = mysql_query($query,$connection))) showerror(); while ($rij = mysql_fetch_array($temp)) { echo $rij['value']; echo "<br>"; } echo '</td>'; echo '<td width=120>'; if (!($temp2 = mysql_query($query2,$connection))) showerror(); while ($rij2 = mysql_fetch_array($temp2)) { echo $rij2['value']; echo "<br>"; } echo '</td>'; echo '</td>'; echo '<td width=150>'; if (!($temp3 = mysql_query($query3,$connection))) showerror(); while ($rij3 = mysql_fetch_array($temp3)) { echo $rij3['value']; echo "<br>"; } echo '</td>'; echo '</table>'; ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/194103-getting-numbers-in-a-list/ Share on other sites More sharing options...
GingerRobot Posted March 5, 2010 Share Posted March 5, 2010 mysql_num_rows? Link to comment https://forums.phpfreaks.com/topic/194103-getting-numbers-in-a-list/#findComment-1022063 Share on other sites More sharing options...
schaaij Posted March 9, 2010 Author Share Posted March 9, 2010 mysql_num_rows? It took me a while testing with this .. but I got it working. Thanks! Link to comment https://forums.phpfreaks.com/topic/194103-getting-numbers-in-a-list/#findComment-1023486 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.