Hi, Thanks Steven and Cameron. When I posted my message here, it was pretty much word of mouth from my team. I had not looked at code and neither did I have chance. But like you all said, when I went to look at code ,indeed one of the update as well as delete had bug in it.
update.... where id = someid <cfif varTest eq ""> and col2 = 'test' or col2 = '' Notice the OR condition without parenthesis. So, it was running for any condition matched because of that OR. So I did this update.... where id = someid <cfif varTest eq ""> and ( col2 = 'test' or col2 = '' ) That fixed the problem. Thanks. <Ajas Mohammed /> http://ajashadi.blogspot.com We cannot become what we need to be, remaining what we are. No matter what, find a way. Because thats what winners do. You can't improve what you don't measure. Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives. On Mon, Feb 22, 2010 at 12:49 PM, Cameron Childress <[email protected]>wrote: > Just a stab int he dark, but I'd look for a UPDATE where clause that > looks something like this: > > UPDATE table > SET somecolumn = somevalue > <cfif isDefined(session.companyid)> > WHERE companyid = #session.companyid# > </cfif> > > The CFIF might be an isDefined() or some other test, but in the above > example if session.companyid doesn't exist, the resulting SQL will > update the entire table. Doesn't matter if you think there is no way > that session.companyid could be missing - there is probably some > unique scenario you didn't account for that triggers it. In this > example, browser behavior could cause that to happen since losing your > session would effectively cause the where clause to never fire. > > Hope that leads you in a helpful direction. > > -Cameron > > On Mon, Feb 22, 2010 at 10:11 AM, Ajas Mohammed <[email protected]> > wrote: > > Hi, > > > > We have a strange problem going on. We recently released some code which > > updated old code on the server. Now, for some users the functionality is > > working fine and for some users its messing up our database. > > > > The functionality is like this. Its supposed to update, insert records > for a > > particular company. Now when some users do that, it works fine. For some > > users, it goes and inserts / updates records for every company we have in > > the database. > > > > Let me know if you need more explanation on this or if I am not clear. > > > > By the way, I believe pretty much everyone is using either internet > explorer > > 7 or 8, with version 8 most likely being used. > > > > Thanks, > > > > <Ajas Mohammed /> > > http://ajashadi.blogspot.com > > We cannot become what we need to be, remaining what we are. > > No matter what, find a way. Because thats what winners do. > > You can't improve what you don't measure. > > Quality is never an accident; it is always the result of high intention, > > sincere effort, intelligent direction and skillful execution; it > represents > > the wise choice of many alternatives. > > > > > > -- > Cameron Childress > Sumo Consulting Inc > http://www.sumoc.com > --- > cell: 678.637.5072 > aim: cameroncf > email: [email protected] > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by http://www.fusionlink.com > ------------------------------------------------------------- > > > >
