In cases when there are no cars added, I'd like to have the application add information. Since there are no cars added 2012-09-25, I'd like to modify the resultset to show data anyway.
Instead of this output result:
2012-09-24 - Audi A6
2012-09-26 - Audi A7
I want to show this:
2012-09-24 - Audi A6
2012-09-25 - No cars found this date
2012-09-26 - Audi A7
I'm trying to achieve it this way:
Quote
$carData = Yii::app()->db->createCommand($sql)->queryAll();
// Modify the resultset
if (!in_array("2012-09-25", $carData["date"]) {
array_push($carData, "date=>2012-09-25");
}
// Modify the resultset
if (!in_array("2012-09-25", $carData["date"]) {
array_push($carData, "date=>2012-09-25");
}

Help











