Null value checking
Posted: Wed Oct 12, 2005 10:16 am
Hi,
I am trying to do an if statement as follows to check for a null value within my table under column asset;
This is not working. Does anybody know how to check for a null value?
I am trying to do an if statement as follows to check for a null value within my table under column asset;
Code: Select all
$row2 = $row['asset']; //set $row2 value of $row asset
if ($row2 == ""){
}
else{
$querytwo = mysql_query("SELECT * FROM ip where asset = $row2"); // Query database with $row2 value
$ip = mysql_fetch_array($querytwo); // get result from database and assign as $ip
}