rcowen00
asked on
PHP Array Null Values
The attached code does not work. What I am attempting to do is to only update records that do not have a null value but the code is updating the field to "0000-00-00" vs leaving it null. Any suggestions? Thank you.
$i = 0;
foreach ( $dateAssignedArray as $editID => $da) {
$dtAssigned=rtrim($da);
if (!empty($dtAssigned)){$update="UPDATE audit SET dateAssigned='$da' WHERE auditID=$editID";
$updateRow=mysql_query($update)or die(mysql_error());
$i++;}
ELSE {
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Data in the field would do it. Thus the value of var_dump(). Glad you got it solved and thanks for the points.
ASKER