I am querying my database to see if the record has an image. if it doesn’t I want to show a white box. if it does have an image in the record, I want to show the image as shown below
<? $media_url = $db->get_sql_field("SELECT media_url FROM " . DB_PREFIX . "item_media WHERE item_id=" . $item_details['item_id'] . " AND
media_type=1 AND upload_in_progress=0 ORDER BY media_id ASC", 'media_url'); ?>
<? if (empty($media_url))
{
echo '';
}
else
{
echo '';
}
?>
I get the following error. Any help would be greatly appreciated
Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ at blah blah location line #128