dbTalk Databases Forums  

Usage of double quotes

comp.databases.oracle.server comp.databases.oracle.server


Discuss Usage of double quotes in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
guru.bhai.rules@gmail.com
 
Posts: n/a

Default Usage of double quotes - 07-03-2009 , 03:13 AM






Hi All,
I have an insert statement that is embedded in a PHP code. It
basically inserts a JS string. We have lots of single quotes inside
the string which we replace by double single quotes. It works fine,
but strangely now, the dev team wants to enclose the whole string in
double quotes. Is there a way of enclosing the entire string in double
quotes? I know Oracle doesn't permit using the same.


This is a part of the string -

)+6;pVM=pVF.substring(y,pVF.indexOf(".",y));}}
else if (window.ActiveXObject && window.execScript){
window.execScript('on error resume next\npVM=2\ndo\npVM=pVM+1\

Thanks in advance
Guru

Reply With Quote
  #2  
Old   
Álvaro G. Vicario
 
Posts: n/a

Default Re: Usage of double quotes - 07-03-2009 , 05:41 AM






guru.bhai.rules (AT) gmail (DOT) com escribió:
Quote:
I have an insert statement that is embedded in a PHP code. It
basically inserts a JS string. We have lots of single quotes inside
the string which we replace by double single quotes. It works fine,
but strangely now, the dev team wants to enclose the whole string in
double quotes. Is there a way of enclosing the entire string in double
quotes? I know Oracle doesn't permit using the same.


This is a part of the string -

)+6;pVM=pVF.substring(y,pVF.indexOf(".",y));}}
else if (window.ActiveXObject && window.execScript){
window.execScript('on error resume next\npVM=2\ndo\npVM=pVM+1\
If you use the proper functions to escape or bind arguments, Oracle
should not care about what's inside your string (beyond charset issues,
which is a different story).

Are you sure your problem is not related to HTML/JavaScript? In
JavaScript, if you need to insert a double quote in a double quote
delimited string, you need to escape with backslashes:

var foo = "y,pVF.indexOf(\".\",y));";


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Reply With Quote
  #3  
Old   
gym dot scuba dot kennedy at gmail
 
Posts: n/a

Default Re: Usage of double quotes - 07-03-2009 , 11:46 AM



<guru.bhai.rules (AT) gmail (DOT) com> wrote

Quote:
Hi All,
I have an insert statement that is embedded in a PHP code. It
basically inserts a JS string. We have lots of single quotes inside
the string which we replace by double single quotes. It works fine,
but strangely now, the dev team wants to enclose the whole string in
double quotes. Is there a way of enclosing the entire string in double
quotes? I know Oracle doesn't permit using the same.


This is a part of the string -

)+6;pVM=pVF.substring(y,pVF.indexOf(".",y));}}
else if (window.ActiveXObject && window.execScript){
window.execScript('on error resume next\npVM=2\ndo\npVM=pVM+1\

Thanks in advance
Guru

use bind variables and then you won't care how the string is quoted.
(also you won't be subject to sql injection, you application will preform
better and scale better)
Jim

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.