navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

replace function integrated into drw

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> replace function integrated into drw
Page: [1]
 
hessfirm

 

Posts: 153
Joined: 9/15/2004
Status: offline

 
replace function integrated into drw - 6/10/2008 9:38:18   
hi everyone!
anyone know how i would use a replace function and then integrate into the drw?

here's my function:

<%public function fSanitize(strText)
replace (strText, "'", "''")
replace (strText, ";", ",")
replace (strText, "(", "")
replace (strText, ")", "")
replace (strText, "=", "")
replace (strText, "xp_", "")
replace (strText, "/*", "")
replace (strText, "*/", "")
replace (strText, "--", "")
End Function%>

and here's my sample drw:
fp_sQry="SELECT * FROM view_xxx WHERE city IN (::city::) and state = '::state::'

Thanks!

_____________________________

Steve Hess
DesiMcK

 

Posts: 445
Joined: 4/26/2004
From: Essex, UK
Status: offline

 
RE: replace function integrated into drw - 6/10/2008 15:29:14   
I assume you want to do the replace on city and state.

try something like:

mycity = fSanitize(Request("city"))

mystate = fSanitize(Request("state"))

Then

fp_sQry="SELECT * FROM view_xxx WHERE city IN (" & mycity & ") and state = '" & mystate &"'"



(in reply to hessfirm)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> replace function integrated into drw
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts