473,756 Members | 6,482 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

characters that must be escaped

Jay
Is there a definitive list of characters that must be escaped in order to
insert them into a text field in mysql?

TIA,
Jay
Jul 20 '05 #1
8 2671
"Jay" wrote:
Is there a definitive list of characters that must be escaped in order to
insert them into a text field in mysql?

TIA,
Jay


http://dev.mysql.com/doc/mysql/en/String_syntax.html

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-charac...ict132699.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=444521
Jul 20 '05 #2
"steve" wrote:
[quote:7b55bfeb2 8="Jay"]Is there a definitive list of characters that must be escaped in order to
insert them into a text field in mysql?

TIA,
Jay


http://dev.mysql.com/doc/mysql/en/String_syntax.html[/quote:7b55bfeb2 8]

If you use php to insert into mysql, you can use mysql_escape_st ring
function, so you don’t have to worry about it:
http://ca2.php.net/mysql_escape_string

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-charac...ict132699.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=444551
Jul 20 '05 #3
\0 An ASCII 0 (NUL) character.
\' A single quote (`'') character.
\" A double quote (`"') character.
\b A backspace character.
\n A newline character.
\r A carriage return character.
\t A tab character.
\z ASCII(26) (Control-Z). This character can be encoded to allow you
to work around the problem that ASCII(26) stands for END-OF-FILE on
Windows. (ASCII(26) will cause problems if you try to use mysql
database < filename.)
\\ A backslash (`\') character.
\% A `%' character. This is used to search for literal instances of
`%' in contexts where `%' would otherwise be interpreted as a wildcard
character. See section 6.3.2.1 String Comparison Functions.
\_ A `_' character. This is used to search for literal instances of
`_' in contexts where `_' would otherwise be interpreted as a wildcard
character. See section 6.3.2.1 String Comparison Functions.

See "http://mysqld.active-venture.com/String_syntax.h tml" for more
details.
--
raqueeb hassan
congo (drc)
Jul 20 '05 #4
Jay
"Raqueeb Hassan" <wi*******@gmai l.com> wrote in message
news:81******** *************** ***@posting.goo gle.com...
\0 An ASCII 0 (NUL) character.
\' A single quote (`'') character.
\" A double quote (`"') character.
\b A backspace character.
\n A newline character.
\r A carriage return character.
\t A tab character.
\z ASCII(26) (Control-Z). This character can be encoded to allow you
to work around the problem that ASCII(26) stands for END-OF-FILE on
Windows. (ASCII(26) will cause problems if you try to use mysql
database < filename.)
\\ A backslash (`\') character.
\% A `%' character. This is used to search for literal instances of
`%' in contexts where `%' would otherwise be interpreted as a wildcard
character. See section 6.3.2.1 String Comparison Functions.
\_ A `_' character. This is used to search for literal instances of
`_' in contexts where `_' would otherwise be interpreted as a wildcard
character. See section 6.3.2.1 String Comparison Functions.

See "http://mysqld.active-venture.com/String_syntax.h tml" for more
details.

Thanks guys,
Jay
Jul 20 '05 #5
"Jay" wrote:
Is there a definitive list of characters that must be escaped in order to
insert them into a text field in mysql?

TIA,
Jay


http://dev.mysql.com/doc/mysql/en/String_syntax.html

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-charac...ict132699.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=444521
Jul 20 '05 #6
"steve" wrote:
[quote:7b55bfeb2 8="Jay"]Is there a definitive list of characters that must be escaped in order to
insert them into a text field in mysql?

TIA,
Jay


http://dev.mysql.com/doc/mysql/en/String_syntax.html[/quote:7b55bfeb2 8]

If you use php to insert into mysql, you can use mysql_escape_st ring
function, so you don’t have to worry about it:
http://ca2.php.net/mysql_escape_string

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-charac...ict132699.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=444551
Jul 20 '05 #7
\0 An ASCII 0 (NUL) character.
\' A single quote (`'') character.
\" A double quote (`"') character.
\b A backspace character.
\n A newline character.
\r A carriage return character.
\t A tab character.
\z ASCII(26) (Control-Z). This character can be encoded to allow you
to work around the problem that ASCII(26) stands for END-OF-FILE on
Windows. (ASCII(26) will cause problems if you try to use mysql
database < filename.)
\\ A backslash (`\') character.
\% A `%' character. This is used to search for literal instances of
`%' in contexts where `%' would otherwise be interpreted as a wildcard
character. See section 6.3.2.1 String Comparison Functions.
\_ A `_' character. This is used to search for literal instances of
`_' in contexts where `_' would otherwise be interpreted as a wildcard
character. See section 6.3.2.1 String Comparison Functions.

See "http://mysqld.active-venture.com/String_syntax.h tml" for more
details.
--
raqueeb hassan
congo (drc)
Jul 20 '05 #8
Jay
"Raqueeb Hassan" <wi*******@gmai l.com> wrote in message
news:81******** *************** ***@posting.goo gle.com...
\0 An ASCII 0 (NUL) character.
\' A single quote (`'') character.
\" A double quote (`"') character.
\b A backspace character.
\n A newline character.
\r A carriage return character.
\t A tab character.
\z ASCII(26) (Control-Z). This character can be encoded to allow you
to work around the problem that ASCII(26) stands for END-OF-FILE on
Windows. (ASCII(26) will cause problems if you try to use mysql
database < filename.)
\\ A backslash (`\') character.
\% A `%' character. This is used to search for literal instances of
`%' in contexts where `%' would otherwise be interpreted as a wildcard
character. See section 6.3.2.1 String Comparison Functions.
\_ A `_' character. This is used to search for literal instances of
`_' in contexts where `_' would otherwise be interpreted as a wildcard
character. See section 6.3.2.1 String Comparison Functions.

See "http://mysqld.active-venture.com/String_syntax.h tml" for more
details.

Thanks guys,
Jay
Jul 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
423
by: Jay | last post by:
Is there a definitive list of characters that must be escaped in order to insert them into a text field in mysql? TIA, Jay
4
5265
by: Ewok | last post by:
let me just say. it's not by choice but im dealing with a .net web app (top down approach with VB and a MySQL database) sigh..... Anyhow, I've just about got all the kinks worked out but I am having trouble preserving data as it gets entered into the database. Primarily, quotes and special characters. Spcifically, I noticed it stripped out some double quotes and a "Registered" symbol &reg; (not the ascii but the actual character"
17
30669
by: Carl Mercier | last post by:
Hi, Is it possible to use special characters like \n or \t in a VB.NET string, just like in C#? My guess is NO, but maybe there's something I don't know. If it's not possible, does anybody know of a VB.NET function (somebody must have coded this already) that will interpret strings containings those special characters, and handle them the same as in C#?
8
3712
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box and save it to a file. This step is not to hard however the contents of the textarea is mostly latex source so it contains just about every special character you can imagine. My question is this, how do I save an exact copy of the textarea...
3
5388
by: Taras_96 | last post by:
Hi everyone, I'm having a bit of trouble understanding the purpose of escaping nulls, and the use of addcslashes. Firstly, the manual states that: "Strictly speaking, MySQL requires only that backslash and the quote character used to quote the string in the query be escaped. This function quotes the other characters to make them easier to read in
12
1858
by: Torsten Bronger | last post by:
Hallöchen! I need some help with finding matches in a string that has some characters which are marked as escaped (in a separate list of indices). Escaped means that they must not be part of any match. My current approach is to look for matches in substrings with the escaped characters as boundaries between the substrings. However, then ^ and $ in the patterns are treated wrongly. (Although I use startpos and endpos parameters for...
1
2650
by: bwilcoxis | last post by:
I have an externally generated xml file that correctly escaping characters such as apostrophes and quotes and rendering them as &amp;#8217; and &amp;#39; the xml file has the following definition: <?xml version="1.0" encoding="iso-8859-1"?> I have tried changing that to: <?xml version="1.0" encoding="utf-8"?> to no avail
3
10196
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class. This is not a regular expression tutorial. Assumes you are already familiar with basic regular expression concepts and terminology. If not, you may want to read some regular expression tutorial. See the end of the article for links to online resources....
0
973
by: hash4sp | last post by:
Hello ! I have a problem with the escaped charactes which I am sending to an aspx page. This is javascript escaped characters %u0646%u062A%u0627%u0626%u062C%20%u0627%u0644%u062 8%u062D%u062B which i sent to the server side aspx page. But it changes back to the original characters ven it reach there.... is there any way to retain the escaped characters untill i send it to the database. I tried using HTTPUtility.urlEncode etc.. but it didnt...
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10046
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9886
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9857
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.