if statement not working
Posted: Tue Mar 16, 2010 7:44 am
Hi, I am looping through a recordset and can't understand why this row always displays "n/a" even though some of the "date_sold" fields actually contain a date.
If I remove the "if" clause and simply display the row, I get the date_sold dates to display when they occur. What could I be doing wrong?
If I remove the "if" clause and simply display the row, I get the date_sold dates to display when they occur. What could I be doing wrong?
Code: Select all
if($row->date_sold = '0000-00-00 00:00:00'){
$sHtml .= '<td nowrap>n/a</td>';
} else {
$sHtml .= '<td nowrap>'.Format_Date($row->date_sold).'</td>';
}