Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Replace in ColdFusion spoiling SQL query -


i've got below mysql query, it's causing error, error below too.

    select distinct s.id id, s.auctioneer auctioneer, s.adverttype adverttype, s.saletype saletype, an.name auctioneername, st.entrycopy saletypename, at.entrycopy adverttypename, s.heading heading, sl.city city, sd.id sdid, sd.startdate startdate        sales s left join saleloc sl on sl.saleid = s.id left join saledates sd on sd.saleloc = sl.id,             auctioneers an,             lookupcopy st,             lookupcopy @     #replace(findwhere,"''","'","all")# ,     s.id = sd.saleid , sl.saleid = s.id     , an.id = s.auctioneer     , st.id = s.saletype     , at.id = s.adverttype     group id          order startdate, auctioneername, city 

error database

select distinct s.id id, s.auctioneer auctioneer, s.adverttype adverttype, s.saletype saletype, an.name auctioneername, st.entrycopy saletypename, at.entrycopy adverttypename, s.heading heading, sl.city city, sd.id sdid, sd.startdate startdate sales s  left join saleloc sl on sl.saleid = s.id  left join saledates sd on sd.saleloc = sl.id, auctioneers an, lookupcopy st, lookupcopy @  'where s.adverttype > 0  , s.saletype > 0  , sl.region = "2" '  , s.id = sd.saleid  , sl.saleid = s.id  , an.id = s.auctioneer  , st.id = s.saletype  , at.id = s.adverttype  group id  order startdate, auctioneername, city  

i didn't write code , i'm not sure why #replace()# being used, can see how fix syntax error it's causing?

before query code, replace follows:  <cfset findwhere = replace(findwhere, "''", "'", "all")# <cfif left(findwhere, 1) eq "'">     <cfset findwhere = right(findwhere, len(findwhere) - 1)> </cfif> <cfif right(findwhere, 1) eq "'">     <cfset findwhere = left(findwhere, len(findwhere) - 1)> </cfif>  <cfquery name="qry" datasource="mysql"> select distinct s.id id, s.auctioneer auctioneer, s.adverttype adverttype, s.saletype saletype, an.name auctioneername, st.entrycopy saletypename, at.entrycopy adverttypename, s.heading heading, sl.city city, sd.id sdid, sd.startdate startdate    sales s  left join saleloc sl on sl.saleid = s.id  left join saledates sd on sd.saleloc = sl.id,         auctioneers an,         lookupcopy st,         lookupcopy @ #findwhere# , s.id = sd.saleid , sl.saleid = s.id , an.id = s.auctioneer , st.id = s.saletype , at.id = s.adverttype group id      order startdate, auctioneername, city </cfquery> 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -