$result = mysql_query($query);

From: Date: Sat, 14 Sep 2002 16:22:32 +0000
Subject: $result = mysql_query($query);
Groups: php.general 
Request: Send a blank email to php-general+get-116385@lists.php.net to get a copy of this message
Hi, I did a query like this: $query = "SELECT * from TABLE WHERE CHAMP = 'truc' order by NO LIMIT 0,10"; $result = mysql_query($query); what i'm trying to do is if the result is !=0 echo the result else echo nothing i tried this if($result != 0){ ?> HTML here if we have result <? while($row = mysql_fetch_array($result)){?> a href="http://<?=$row[WEB];?>" target="_blank"><?=$row[DESCRIPTION];?></a> <?php } }?> thanx for your help

« previous php.general (#116385) next »