Firstly, you are using the assignment operator when you should be using the comparison operator "==":
/* allways evaluates to false as it is assigning the null stirng to $row['end_date_year'] */
if ($row['end_date_year'] = "")
/* it should be */
if ($row['end_date_year'] == "")
Secondly, when making multiple comparisons in a single if statement, you should enclose each distinct test in the expression in brackets:
if (($row['start_date_year'] >= date("Y")) && ($row['start_date_month'] >= date("n")))
Also, notice how && is use instead of and. && increases the efficiency of the code, as if one of the test fail, it immediatly stops evaluating any of the other tests in that expression.
Now to the problem. All these data are intergers, correct? So, why not use the mktime() function, it is a lot easier to then compare the dates:
// returns an integer timestamp for current day
$curday = mktime(0,0,0, date('n'), date('d'), date('Y'));
if ($row['end_date_year'] == "")
{
$start_time = mktime(0,0,0, $row['start_date_month'], $row['start_date_day'], $row['start_date_year']);
if ($start_time >= $curday)
{
include 'data/listing_code.php';
}
}
else
{
$end_time = mktime(0,0,0, $row['end_date_month'], $row['end_date_day'], $row['end_date_year']);
if ($end_time >= $curday)
{
include 'data/listing_code.php';
}
}