Hey
I want to pick out one specified variable from a table in my database.
My database look like this (infront of all variables i have matchs_06_ in the original database) :
id time place round result hpic apic hteam ateam
1 19-07-06 19:00 Esbjerg Idrætspark 1 logo_efb.gif logo_sif.gif Esbjerg FB Silkeborg IF
2 23-07-06 15:00 Silkeborg Stadion 2 logo_sif.gif logo_fck.gif Silkeborg IF FC København
What i want is to chose for example the second variable with the id number 2 to be printed out on my homepage.
The code im using, is as following (I know that im using the LIMIT code and that is wrong, im only using it now, so both tables from the database doesn't show at my homepage):
$result = mysql_query("SELECT * FROM matchs_06 ORDER BY matchs_06_id LIMIT 1");
while ($row = mysql_fetch_array($result))
{
$time = $row['matchs_06_time'];
$place = $row['matchs_06_place'];
$hteam = $row['matchs_06_hteam'];
$ateam = $row['matchs_06_ateam'];
$apic = $row['matchs_06_apic'];
$hpic = $row['matchs_06_hpic'];
}
$matchday.=<<<SIF
<td valign='top'>
<table class='storybox' width='100%'>
<tr>
<td class='table-cellpic'><font size='3'>Næste kamp:</font></td>
</tr>
<tr>
<td>
<table>
<tr>
<td width='150'></td>
<td colspan='3' align='center'>
$place
</td>
<td colspan='2' align='right' width='250'>
d. $time
</td>
</tr>
<tr>
<td colspan='5' height='10' align='center'>
<img src='../images/black.jpg' width='475' height='1' >
</td>
</tr>
<tr>
<td>
<img src='../images/clubs/$hpic'>
</td>
<td class='team' valign='middle' align='center' width='220'>$hteam</td>
<td align='center' class='team' valign='middle'>-</td>
<td class='team' valign='middle' align='center' width='220'>$ateam</td>
<td>
<img src='../images/clubs/$apic'>
</td>
</tr>
<tr>
<td colspan='5' height='10'>
</td>
</tr>
<tr>
<td></td>
<td align='center' colspan='3'>Klik her for mere kampinfo.</td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
I really hope someone can help me.
HeinekenBeer