Jump to content

bergjes

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by bergjes

  1. :)Thanks Barand!!!!! It's just what I wanted. Super!!
  2. Hi, I'm totaly new with PhP, so I don't know if this is an easy thing to accomplish. I have to display data from my MySQL database on my website. I have a script that does that, but the scipt put all the data in one large table. What I want is that it puts data of the same "categorie" in separate tables. An example of how I want it eventually you can found on  http://www.basketball.nl/rayon/west/db/wedstrijd/clubprogramma.pl (Choose a Club and for "Hele seizoen") The code I have is like this: <? $username=""; $password=""; $database="joomla"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM qrycao"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); echo "<b><left>Tabel CAO lonen per 1 juli 2006</center></b><br><br>"; ?> <table width="100%"  border="1" cellspacing="2" cellpadding="2">   <tr bgcolor="#FF9900">     <th scope="col">Functieklasse</th>     <th scope="col">Leeftijd</th>     <th scope="col">Functiejaren</th>     <th scope="col">Uurloon</th>     <th scope="col">p/week</th>     <th scope="col">p/4 weken </th>     <th scope="col">p/maand</th>   </tr> <? $i=0; while ($i < $num) { $functieklasse=mysql_result($result,$i,"functieklasse"); $leeftijd=mysql_result($result,$i,"leeftijd"); $functiejaren=mysql_result($result,$i,"functiejaren"); $loon_uur=mysql_result($result,$i,"loon_uur"); $week=mysql_result($result,$i,"week"); $weken=mysql_result($result,$i,"weken"); $maand=mysql_result($result,$i,"maand"); ?>   <tr>     <td><? echo $functieklasse; ?>&nbsp;</td>     <td><? echo $leeftijd; ?>&nbsp;</td>     <td><? echo $functiejaren; ?>&nbsp;</td>     <td><? echo $loon_uur; ?>&nbsp;</td>     <td><? echo $week; ?>&nbsp;</td>     <td><? echo $weken; ?>&nbsp;</td>     <td><? echo $maand; ?>&nbsp;</td>   </tr> <? $i++; } echo "</table>";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.