gallery is not a valid CB profile name. Asked : select * from CBPFacList where PUBLISH=1 AND WEBPAGE rlike "gallery" limit 1