$model = $modelCon->getModel($modelId); $model = $model->fetch(); $modelName = $model['model_name']; $make = $makeCon->getMake($model['make_id']); $make = $make->fetch(); $makeName = $make['make_name']; $year = $car['year']; $rego = $car['rego_number']; $fo = $foCon->getFeaturesForOffer($offerId); $fo = $fo->fetchAll(); $featureIds = array(); foreach ($fo as $f) { $featureIds[] = $f['feature_id']; } foreach ($featureIds as $featureId) { $f = $featureCon->getFeature($featureId); $f = $f->fetch(); $features[] = $f['feature_name']; } } } else { ?> <div class="alert alert-danger" role="alert"> <strong>Uh oh!</strong> The database returned the following error:<br/> <em><?php echo $sale->errorInfo()[2]; ?> </em> </div> <?php }
if ($mediaCount > 0) { foreach ($mediaResults as $image) { $media[] = $image; } } } $fos = $foCon->getFeaturesForOffer($offerId); if ($fos->errorInfo()[2] == null) { $fos = $fos->fetchAll(); $foCount = count($fos); if ($foCount > 0) { foreach ($fos as $fo) { $featureIds[] = $fo['feature_id']; } foreach ($featureIds as $featureId) { $f = $featureCon->getFeature($featureId); $f = $f->fetch(); $features[] = $f; } } } } } else { ?> <div class="alert alert-danger" role="alert"> <strong>Uh oh!</strong> The database returned the following error:<br/> <em><?php echo $car->errorInfo()[2]; ?> </em> </div>