Author Topic: Getting numbers in a list  (Read 789 times)

0 Members and 1 Guest are viewing this topic.

Offline schaaijTopic starter

  • Irregular
  • Posts: 2
    • View Profile
Getting numbers in a list
« on: March 04, 2010, 02:22:37 AM »
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>

Offline GingerRobot

  • Guru
  • Fanatic
  • *
  • Posts: 4,133
  • Gender: Male
  • Call me Ben
    • View Profile
Re: Getting numbers in a list
« Reply #1 on: March 05, 2010, 03:05:18 PM »

Offline schaaijTopic starter

  • Irregular
  • Posts: 2
    • View Profile
Re: Getting numbers in a list
« Reply #2 on: March 09, 2010, 05:24:33 AM »
mysql_num_rows()?

It took me a while testing with this .. but I got it working.

Thanks!