JustAskVin Insights

Ideas for leading and building technology well.

Practical writing on delivery, architecture, CMS migrations, digital growth, and the decisions that shape strong web experiences.

Latest

Page 13 of recent writing

All insights home →

web development

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); $c->add(MyTablePeer::COLUMN1,’abc’); $c->add(MyTablePeer::COLUMN2,’xyz’); MyTablePeer::doUpdate($c); Thanks

Dec 22, 2008

Read article

web development

Show tooltip on mouseover

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: 2px; background-color: lightyellow; visibility: hidden; z-index: 100; filter: progid:DXImageTransform.Microsoft.Shadow(color=

Dec 10, 2008

Read article

Uncategorized

unicode issue in Perl CGI

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 collation of the field that is to be displayed as “Binary”. If this does not work then you can try the below option in your [&hellip;]

Aug 29, 2008

Read article

web development

update query based on condition

$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->a

Jun 27, 2008

Read article

web development

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); $crit

Jun 27, 2008

Read article

web development

No connection params set for propel

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 all: propel: class: sfPropelDatabase param: datasource: symfony dsn: mysql://root:@localhost/mywebsite with all: propel: class: sfPropelDatabase pa

Apr 5, 2008

Read article

web development

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 di

Mar 26, 2008

Read article

Uncategorized

To calculate date difference between two given dates

function timeDifference(startDate,endDate) { date1 = startDate; date2 = endDate; laterdate = date1.split(“-“); laterY=laterdate[0]; laterM=laterdate[1]; laterD=laterdate[2]; earlierdate = date2.split(“-“); earlierY=earlierdate[0]; earlierM=earlierdate[1]; earlierD=earlierdate[2]; var laterdate = new Date(laterY,laterM,

Mar 26, 2008

Read article