Based on entry of STYLEID I display a photo found on that record.
If make an error and need to enter a new styleid value, and there is no image on the record, I want the image to clear. I can’t get that to happen
Here is code
{photoDisplay}="";
$check_sql = “SELECT photo1”
. " FROM tblStyle"
. " WHERE styleid = ‘" . {styleid} . "’";
sc_lookup(rs, $check_sql);
if (isset({rs[0][0]})) // Row found
{
{photoDisplay} = {rs[0][0]};
if({photoDisplay}>" ")
{
echo " photo exists";
;}
else
{{photoDisplay} = "";
echo " photo not exists";
}
;}
Is there such a thing as a CLEAR command