|
| |
|
|
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 &"'"
|
|
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
|
|
|