20080728 1321 GMT-6 I want to post a message that when there are NO product available. Its turned out to be more difficult than I thought.
I tried is_array, empty, !empty, thinking - well, if its empty then I know nothing is there. But its not working. if(mysql_select_db('wt')){ $query = "SELECT name FROM deer_product WHERE deer_type='".$_GET['deer_type']."'"; if($result = mysql_query($query, $dbc)){ while ($row = mysql_fetch_array($result)){ print '<center>'; if(!empty($row[0])){ print '<p> <ahref="deer_product.php?deer_type='.$_GET['deer_type']. '&name='.$row[0].'"><b>'.$row[0].'</b></a></p>'; } else { print 'There is no '.$_GET['deer_type'].' for sale at this time.'; } print '</center>'; } } }