Vladimir Buzalka
asked on
What is idea behind escape characters?
Dear Experts
I am starting with mySQL and I cannot understand all the concept of escape characters in strings.
What was idea behind this? I have feeling that it makes my life just more difficult if I want to assure that string which I have in variable is indeed stored in mySQL in exact form.
Many thanks for your advices
Vladimir
I am starting with mySQL and I cannot understand all the concept of escape characters in strings.
What was idea behind this? I have feeling that it makes my life just more difficult if I want to assure that string which I have in variable is indeed stored in mySQL in exact form.
Many thanks for your advices
Vladimir
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you give us an example of something you are trying to write to the database for which you feel you need to make use of escaping?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear Experts
many thanks for your explanations, I think I can understand need for character escaping now.
Thanks a lot again
V
many thanks for your explanations, I think I can understand need for character escaping now.
Thanks a lot again
V
Adding a backslash character (\) before certain other characters forms a special command. For example:
\n "escapes" the literal letter "n" and instead is interpreted as a new line:
mysql> SELECT 'Paul nNeralich';
Paul nNeralich
mysql> SELECT 'Paul \nNeralich';
Paul
Neralich