Problem with If statement ...
Posted: Wed Sep 04, 2002 12:15 pm
Hi,
Here is what i want to do. See code bellow.
if $n1 == 0 , i want it to echo "this message"
if $n1 >= 1 , i want it to echo "something else"
while inserting the record as a link to it.
Let me know if you can help!
Here is the code;
Here is what i want to do. See code bellow.
if $n1 == 0 , i want it to echo "this message"
if $n1 >= 1 , i want it to echo "something else"
while inserting the record as a link to it.
Let me know if you can help!
Here is the code;
Code: Select all
tTbl("Annonces classées", "left");
$q1 = mysql_query("SELECT *, DATE_FORMAT(date, '$site_date_jh') AS dateh FROM annonce ORDER BY date DESC LIMIT ".$max_annonce);
if ($n1 == 0) {
echo "<p align="center">Voici les dernières annonces classées. Cliquez sur le titre pour y accéder.</p>\n"; }
while ($r1 = mysql_fetch_array($q1)) {
echo "<p><a href="/annonce.php" class="mma"><span class="mma">".htmlentities($r1ї"titre"])."</span></a></p><br>\n";}