PHP Code:
$sql = "select configuration_key, configuration_value from " . TABLE_PRODUCT_TYPE_LAYOUT . " where configuration_key='" . $zv_key . "'";
$zv_key_value = $db->Execute($sql);
if ($zv_key_value->RecordCount() > 0) {
return $zv_key_value->fields['configuration_value'];
} else {
$sql = "select configuration_key, configuration_value from " . TABLE_CONFIGURATION . " where configuration_key='" . $zv_key . "'";
$zv_key_value = $db->Execute($sql);
if ($zv_key_value->RecordCount() > 0) {
return $zv_key_value->fields['configuration_value'];
} else {
return false;
}
}
}
If this first key_value is greater than 0, the configuration_value is returned from TABLE_PRODUCT_TYPE_LAYOUT and the rest is skipped over; if equal to 0, the next test is performed.
If the second key_value is greater than 0, the configuration_value is returned from TABLE_CONFIGURATION; if equal to 0, "false" is returned.
Bookmarks