Hej udviklere.
jeg sidder i et lille problem jeg vil gerne have at min mysql kun skal vise ting der er 1 uge gammelt.
jeg bruger TIME() når jeg smider det ind i mysql.
her kan i lige få mit mysql kald.
-----------
<div align="center">
<b><font size="6">Nyheder</font></b><?mysql_connect("XXXXXX", "XXXXXXX", "XXXXXXX");
mysql_select_db("gb2490");
$query = mysql_query("SELECT * FROM jl_varer where status3 = 'Ja' ORDER BY varernavn DESC") or die("");
while($row = mysql_fetch_array($query)){?>
<div align="center">
<? if ($row[tilbud] == "Ja") {
?>
<table border="1" cellpadding="0" cellspacing="1" width="448">
<tr>
<td width="263">
<div align="left">
<b>Varenavn :</b> <?php echo($row[varernavn]); ?></div>
</td>
<td rowspan="4" width="174">
<div align="center">
<img src='Tilbud.gif?php print("$row[billed]") ?>' border="0" width="174" height="174"></div>
</td>
</tr>
<tr>
<td width="263">
<div align="left">
<b>Status :</b> <?php echo($row[status]); ?></div>
</td>
</tr>
<tr>
<td width="263">
<div align="left">
<b>Størelser : </b><?php echo($row[size]); ?></div>
</td>
</tr>
<tr>
<td width="263">
<div align="left">
<b>Pris :</b> <?php echo($row[pris]); ?></div>
</td>
</tr>
<tr>
<td width="263"><b>Beskrivelse :</b><br><br><?php echo($row[beskrivelse]); ?></td>
<td width="174">
<div align="center">
<img src='pic/<?php print("$row[billed]") ?>' border="0"></div>
</td>
</tr>
</table>
<br>
<?
} elseif ($row[tilbud] == "Nej") {
?>
<table border="1" cellpadding="0" cellspacing="1" width="448">
<tr>
<td colspan="2">
<div align="left">
<b>Varenavn:</b> <?php echo($row[varernavn]); ?></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="left">
<b>Status:</b> <?php echo($row[status]); ?></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="left">
<b>Størelser:</b> <?php echo($row[size]); ?></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="left">
<b>Pris:</b> <?php echo($row[pris]); ?></div>
</td>
</tr>
<tr>
<td width="209"><b>Beskrivelse:</b><br><br><?php echo($row[beskrivelse]); ?></td>
<td>
<div align="center">
<img src='pic/<?php print("$row[billed]") ?>' border="0"></div>
</td>
</tr>
</table>
<br>
<?
} else {
?>
<?
} ?>
<?php
}
echo "</table>";
?></div>
//Mark S. Johansen