How to apply or condition for mysql query in symfony

$cs = new Criteria(); $criterion = $cs->getNewCriterion(HfArticlesPeer::AR_DESCRIPTION,’%’.$searchText.’%’,Criteria::LIKE); $criterion->addOr($cs->getNewCriterion(HfArticlesPeer::AR_TITLE,’%’.$searchText.’%’,Criteria::LIKE)); $criterion1 = $cs->getNewCriterion(HfArticlesPeer::AR_STATUS,’ARCHIVE’,Criteria::EQUAL); $criterion1->addOr($cs->getNewCriterion(HfArticlesPeer::AR_STATUS,’PUBLISHED’,Criteria::EQUAL)); $cs->add($criterion1); $cs->add($criterion); $cs->add(HfArticlesPeer::AR_CATEGORY ,InsuranceCatId,Criteria::EQUAL); $searchResInsuranceArticle = HfArticlesPeer::doSelect($cs);

how to create html element dynamically in javascript

var itemManCnt=2; function addMoreHomeImage() { if(itemManCnt==6) { alert(“You can upload only 5 files”); return false; } var parentObj=document.getElementById(‘FileElementItem’); var divClrBoth = document.createElement(“div”); divClrBoth.setAttribute(“class”,”ClrBoth”); divClrBoth.setAttribute(“id”,itemManCnt); var divClrSelect = document.createElement(“div”); divClrSelect.setAttribute(“class”,”Select”); var…

validate email address

function echeck(str) { var at=”@” var dot=”.” var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ return false } if (str.indexOf(dot)==-1 ||…