select portal_ownerid, portal_ownerType from tbl_CUS_websites where portal_name = #lcase(ConfigItem)#=#ConfigVal#
select * from tbl_APP_Configurations where applicationCode = '103a' and ownerid = 0 and OwnerType = 'MFR' and parametername = '#configItem#' insert into tbl_APP_Configurations(ApplicationCode, ApplicationInstance, OwnerId, OwnerType, ParameterName, ParameterType, ParameterValue) values ('103a', '*', 0, 'MFR', '#configItem#', 'string', '') select * from tbl_APP_Configurations where applicationCode = '103a' and ownerid = and OwnerType = and parametername = '#configItem#' insert into tbl_APP_Configurations(ApplicationCode, ApplicationInstance, OwnerId, OwnerType, ParameterName, ParameterType, ParameterValue) values ('103a', '#_portalName#', #_getOwnerid.portal_ownerid#, '#_getOwnerid.portal_ownerType#', '#ConfigItem#', 'string', '#ConfigVal#') update tbl_APP_Configurations set ParameterValue = '#ConfigVal#' where OwnerId = #_getOwnerid.portal_ownerid# and OwnerType = '#_getOwnerid.portal_ownerType#' and ParameterName = '#ConfigItem#' and ApplicationCode = '103a' and ApplicationInstance = '#_portalName#'