update query in symphony (Method 2)
For example to execute query like UPDATE tableName SET column1 = 'abc',column2 = 'xyz' WHERE column ='1'; In symfony you can do it this way $c = new Criteria(); $c->add(MyTablePeer::COLUMN,1);…
For example to execute query like UPDATE tableName SET column1 = 'abc',column2 = 'xyz' WHERE column ='1'; In symfony you can do it this way $c = new Criteria(); $c->add(MyTablePeer::COLUMN,1);…
Step 1: Copy this css style code into your header tage right before the end of header tag <style type=”text/css”> #dhtmltooltip{ position: absolute; border: 1px solid red; width: 150px; padding:…
function sortArray(x,y) { return ((x < y) ? -1 : ((x > y) ? 1 : 0)); } var givenarr = ,,]; givenarr.sort(sortArray); ======================== The result array will be givenarr…
When some special character(or other language data) is displayed as ‘? ? ? ? ?’ in browser, then you have to make the following change. 1.In your table set the…
$con = sfContext::getInstance()->getDatabaseConnection(‘propel’); $c2 = new Criteria(); $c2->add(TblTopPeer::TF_ZIPCODE,$topForecastInfo->getForZipcode()); $c2->add(TblTopPeer::TF_FORCASTDATE,$topForecastInfo->getForForecastdate()); $c3 = new Criteria(); $c3->add(TblTopPeer::TF_FID,$topForecastInfo->getForId()); $c3->add(TblTopPeer::TF_USERID,$topForecastInfo->getForUserid()); $c3->add(TblTopPeer::TF_LATITUDE,$zipInfo->getZipLatitude()); $c3->add(TblTopPeer::TF_LONGITUDE,$zipInfo->getZipLongitude()); BasePeer::doUpdate($c2, $c3, $con); OR $con = Propel::getConnection(); // select from... $c1 = new…
$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);
When you are using symfony framework , and when you get the error as “No connection params set for propel” ,Do the following changes . In config /databases.yml file Replace…
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…
function isValidfile(filename) { file_value = filename; var checkfile = file_value.toLowerCase(); if (!checkfile.match(/(\.doc|\.DOC|\.pdf|\.PDF)$/)) { return false; } else { return true; } }
function isValidImage(imagename) { imagefile_value = imagename; var checkimg = imagefile_value.toLowerCase(); if (!checkimg.match(/(\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG|\.jpeg|\.JPEG)$/)) { return false; } else { return true; } }