Hi Sinisa,
1.
Thanks for the detailed mails .I got to the problem I
am facing with '\' character.
2.
Actually I am expecting the function to add an
additional \ when a single '\' comes as a part of
string.For example:
I want to insert a File path like "\Program
Files\xy\xyz.geo" I n expecting the function
mysql_escape_string() to convert it into "\\Program
Files\\xy\\xyz.geo" which it is not doing precisely.

Am I right in my perspective?i.e mysql_escape_string
does not provide support for a single backslash
characher which comes as part of the string.
Even the function code which you have sent does not
say anything about it.
Shall I have to write a small code to replace '\' with
a '\\'?
Then :Is it a Bug?
3.
Once again thanks for your patience .I am putting down
the problem in detail as it provides scope for
improvement in next version.

Regards,
Ravi
Regards,
Ravi
--- Sinisa Milivojevic <[EMAIL PROTECTED]> wrote: > VVM
Ravikumar Sarma Chengalvala writes:
> > Hi Sinisa,
> > Thanks for the detailed mail.Can you send me the
> > syntax for mysql_escape_string() please so that I
> can
> > check up with what I have been trying out.
> > 
> > Regards,
> > Ravi
> 
> 
> 
> Here is an example from C++ :
> 
>       char* s = new char[in.size()*2+1];
>       mysql_escape_string(s, const_cast<char
> *>(in.c_str()), in.size() );
> 
> 
> Actually, it is quite simple :
> 
> unsigned long mysql_escape_string(char *to,const
> char *from,  unsigned long from_length);
> 
> 
> You pass to char array of at least 2 * from_length +
> 1 bytes. You pass
> original char array as a second parameter and it's
> total length as a third
> parameter.
> 
> The above function returns a new length of `to' char
> array.
> 
> 
> Regards,
> 
> Sinisa
> 
>       ____  __     _____   _____  ___     ==  MySQL
> AB
>      /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa
> Milivojevic
>     /*/ /*/ /*/   \*\_   |*|   |*||*|    
> mailto:[EMAIL PROTECTED]
>    /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaca,
> Cyprus
>   /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____
>   ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
>              /*/             \*\               
> Developers Team
> .
> 


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to