Re: mysqldump not escaping single quotes in field data

2012-06-16 Thread Ananda Kumar
mailto:j...@newcenturydata.com] > > Sent: Friday, June 15, 2012 10:19 AM > > To: mysql@lists.mysql.com > > Subject: mysqldump not escaping single quotes in field data > > > > My backups from a mysqldump process are useless, because the dump files > > are not escaping

RE: mysqldump not escaping single quotes in field data

2012-06-15 Thread Rick James
Are you using an abnormal CHARACTER SET or COLLATION? SHOW CREATE TABLE Show us the args to mysqldump. > -Original Message- > From: James W. McNeely [mailto:j...@newcenturydata.com] > Sent: Friday, June 15, 2012 10:19 AM > To: mysql@lists.mysql.com > Subject: mysqldump not

Re: mysqldump not escaping single quotes in field data

2012-06-15 Thread Ananda Kumar
s | |2 | aditi | |3 | thims | |2 | aditi | |3 | thims | |2 | aditi | |3 | thims | |2 | aditi | |3 | thims | |5 | O'Brien | +--+-+ May be u want to upgrade you database On Fri, Jun 15, 2012 at 10:48 PM, James W. McNeely wrote: &

mysqldump not escaping single quotes in field data

2012-06-15 Thread James W. McNeely
My backups from a mysqldump process are useless, because the dump files are not escaping single quotes in the data in the fields. So, O'Brien kills it - instead of spitting out 'O\'Brien' it spits out 'O'Brien' I don't see anywhere in the documenta

Re: Problem Escaping a Boolean Query

2005-07-27 Thread Dobromir Velev
I ran into this problem a few months ago and the only workaround I could think of was to escape the quotes in the table with """. Then your query should be something like this select * from feeds where MATCH(feed_title, feed_content) AGAINST('"Sean "P. Diddy" +Combs"' IN BOOLEAN MODE) order by

Problem Escaping a Boolean Query

2005-07-26 Thread Blogfreaks.com
I'm using a boolean query to perform an exact match on musicians within a text field. However, if the musician's name contains a quote, I get inaccurate results. For example, this query works fine: select * from feeds where MATCH(feed_title, feed_content) AGAINST('"Tom Petty"' IN BOOLEAN MODE)

Charsets and Escaping

2005-04-20 Thread jalil
What is the relationship b/w the charset we use and the connection escape function? I have a few tables that use utf8 as encoding and I want to make sure the escaping works fine as the string I pass to the escape() call are in utf8 already. I use python/apache/MySQLdb and tried specifying unicode

Re: Select statement escaping characters question

2004-08-22 Thread Michael Stassen
You are comparing the page_url column to a constant string (the contents of $url_field). Constant strings must be quoted in SQL (otherwise they look like column names). Since you use double quotes around the whole string, you must escape double quotes within the string. Without escaping, you

Select statement escaping characters question

2004-08-22 Thread leegold
Wondered in this example why $url_field apparently must be in quotes ie. escaped quotes? Since the whole php/mysql statement is quotes too wouldn't it interpolate correctly w/out added quotes? What's the idea behind it? I got this off of a a web tutorial. It's a varchar field. Thanks for helping w

Re: Slightly OT: MySQL + PHP and escaping data to output to a web page

2004-04-15 Thread Daniel Kasak
Mark Susol | Ultimate Creative Media wrote: On 4/15/04 11:49 PM, "Daniel Kasak" <[EMAIL PROTECTED]> wrote: I'm currently using: replace(replace(NoteText, '<', '<'), '>', '>') as NoteText to replace the offending characters with HTML escape codes. Is there a cleaner way of doing this? Yo

Re: Slightly OT: MySQL + PHP and escaping data to output to a web page

2004-04-15 Thread Mark Susol | Ultimate Creative Media
On 4/15/04 11:49 PM, "Daniel Kasak" <[EMAIL PROTECTED]> wrote: > I'm currently using: > > replace(replace(NoteText, '<', '<'), '>', '>') as NoteText > > to replace the offending characters with HTML escape codes. Is there a > cleaner way of doing this? You can try the php command: htmlspecialc

Slightly OT: MySQL + PHP and escaping data to output to a web page

2004-04-15 Thread Daniel Kasak
Hi all. Yes I know this is a little off-topic, but also a little on-topic... I have a user who likes to use the 'less than' sign ( < ) in notes he enters into the DB. When I print them out to a web page, they are interpreted as an HTML code and everything after them '<' is not printed. I'm curr

Re: Escaping single quotes

2004-01-06 Thread robert_rowe
You could always write your own function to do the escaping for you. This following link is an example written in VB that you could adapt to whatever language you are using. http://www.vbmysql.com/samplecode/stripquote.html Here is another way of doing it if you can link to the libmySQL.dll

Re: Escaping single quotes

2004-01-06 Thread Jochem van Dieten
Matthew Stuart said: > I am on my first MySQL DB and it is very text heavy because it is a > news site, therefore there is a great deal of use of the apostrophe > or as MySQL would see it the single quote. I was hoping to be able > to use double quotes to overcome the need to constantly have to >

RE: Escaping single quotes

2004-01-06 Thread Jay Blanchard
escaping and/or encoding for single and double quotes in database held text. Most other languages have provisions for this as well, using either built-in functions or regular expressions. Jay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

Escaping single quotes

2004-01-06 Thread Matthew Stuart
I am on my first MySQL DB and it is very text heavy because it is a news site, therefore there is a great deal of use of the apostrophe or as MySQL would see it the single quote. I was hoping to be able to use double quotes to overcome the need to constantly have to escape the apostrophe/single

Re: Character escaping

2003-12-06 Thread Joakim Ryden
On 12/5/03 10:40 PM Bob MacIsaac wrote: [...] This is likely something simple but I've spent too much time on it with no results - hope somebody can help - thanks. Hi Bob - try looking into the $dbh->quote() method. --Jo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mys

Character escaping

2003-12-05 Thread Bob MacIsaac
ESCAPED BY '\' LINES TERMINATED BY '\r' IGNORE 0 LINES}); The problem is that apsotrophy (') and quote (") characters do not escape properly - I am getting (Õ) and (Ó) characters instead. I have tried a test of escaping

RE: Escaping single quotes

2003-12-02 Thread Jay Blanchard
[snip] > The site is a news based site and has the use of the single quote or > apostrophe (') through most of it's articles. I think that each article > at present is an external .txt file that is pulled in to Oracle. If I > carried on this method of having an external .txt file would that over >

Re: Escaping single quotes

2003-12-02 Thread Thomas Spahni
Matthew, I really don't understand the question. Apostrophes must be properly escaped when text is inserted into the MySQL db, but any perl script will easily do this for you. You may convert to HTML at the same time. If the database gives nothing but a path to a *.txt source then your HTML code

Escaping single quotes

2003-12-01 Thread Matthew Stuart
I am going to take over an existing website and in its present format it is a site powered by an Oracle DB. I will be migrating to MySQL. The site is a news based site and has the use of the single quote or apostrophe (') through most of it's articles. I think that each article at present is an

Re: escaping slashes not present in table?

2003-09-18 Thread Fred van Engen
think this is why people recommend that you > > *don't* use PHP's magic > > quotes. > > I hit this problem in a few areas and decided to > > turn it off. > > > > Use PHP's functions: > > > > stripslashes() and > > addslashes() > &

Re: escaping slashes not present in table?

2003-09-18 Thread Abs
--- Daniel Kasak <[EMAIL PROTECTED]> wrote: > Abs wrote: > > >mysql and php question: > >the magic_quotes_gpc is set to 1. when i echo it to > >the browser, it shows the added slashes. i inserted > >these same values into a database. when i read the > >database values and printed them, i forgot t

Re: escaping slashes not present in table?

2003-09-08 Thread Daniel Kasak
Abs wrote: mysql and php question: the magic_quotes_gpc is set to 1. when i echo it to the browser, it shows the added slashes. i inserted these same values into a database. when i read the database values and printed them, i forgot to use stripslashes. but i was surprised to see that the slashes

escaping slashes not present in table?

2003-09-08 Thread Abs
mysql and php question: the magic_quotes_gpc is set to 1. when i echo it to the browser, it shows the added slashes. i inserted these same values into a database. when i read the database values and printed them, i forgot to use stripslashes. but i was surprised to see that the slashes were already

Re: Escaping UCS2 characters

2003-08-27 Thread Simon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 27 August 2003 12:05 pm, I wrote: > How do I escape UCS2 characters in a latin1 SQL statement? Okay, so the answer's in the manual. I just didn't look hard enough... http://www.mysql.com/doc/en/Charset-literal.html So I do: 'INSERT INT

Escaping UCS2 characters

2003-08-27 Thread Simon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I asked a question along these lines yesterday, but got no response. Perhaps I can make it clearer: I have a ucs2 table in my predominantly latin1 database. (Mysql 4.1.1 from bk) I am using latin1 most of the time, it's the default charset, and

question about mysql-4.x escaping with USE_MB

2003-02-28 Thread xuefer tinys
quoted from mysql-4.1/libmysql/libmysql.c = static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to, const char *from, ulong length) { const char *to_start=to; const char *end; #ifdef USE_MB my_bool use_mb_flag=use_mb(charset_info); #endif for (end=from+length;

re: Escaping characters in select query problem...

2002-09-10 Thread Egor Egorov
Mike, Monday, September 09, 2002, 2:45:36 AM, you wrote: M > I am having trouble with an sql query. I have a table with a column that M > has an '#' sign in the name. The problem is I can't seem to escape the M > column name to be able to select it. M > IE: M > select test#1 from test or sel

Escaping characters in select query problem...

2002-09-08 Thread Mike  
I am having trouble with an sql query. I have a table with a column that has an '#' sign in the name. The problem is I can't seem to escape the column name to be able to select it. IE: select test#1 from test or select `test#1` from test Both don't work and i get the error Unknown column 't

Problem with Escaping quotes

2002-06-10 Thread Trevor Phillips
') with a backslash. ie; \' However, this method of escaping does not seem to work with some other DBs (eg; Oracle), so it breaks when talking to other DBs. I changed my routine to instead replace all single quotes (') with two single quotes (''), which seems to be a mor

Re: mysql_real_query and escaping a semicolon

2002-04-30 Thread Michael Widenius
Hi! > "Anna" == Anna Fowles-Winkler <[EMAIL PROTECTED]> writes: Anna> I removed the semicolon from the end of the query string, and I still get the Anna> same syntax error: Anna> You have an error in your SQL syntax near ''.1' at line 10 Anna> This is what the query looks like: Anna> INSE

Re: mysql_real_query and escaping a semicolon

2002-04-29 Thread Anna Fowles-Winkler
I removed the semicolon from the end of the query string, and I still get the same syntax error: You have an error in your SQL syntax near ''.1' at line 10 This is what the query looks like: INSERT INTO micromodels (name, revision, dynamic, m_class, novars, equation, min_0, min_1, min_2, min_3

Re: mysql_real_query and escaping a semicolon

2002-04-29 Thread Paul DuBois
At 8:37 -0600 4/29/02, Anna Fowles-Winkler wrote: >Gerald Clark wrote: > >> The semicolon does not belong there. > >Where? At the end of the query or in the string? > >--Anna At the end. Semicolons are perfectly legal in data values (which is why this whole episode seems odd), but you don't pu

Re: mysql_real_query and escaping a semicolon

2002-04-29 Thread Anna Fowles-Winkler
Gerald Clark wrote: > The semicolon does not belong there. Where? At the end of the query or in the string? --Anna > > > Anna Fowles-Winkler wrote: > > >Anna Fowles-Winkler wrote: > > > >>Paul DuBois wrote: > >> > Paul DuBois wrote: > > > At 14:37 -0600 4/26/02, Anna Fowles-Winkl

Re: mysql_real_query and escaping a semicolon

2002-04-29 Thread Gerald Clark
The semicolon does not belong there. Anna Fowles-Winkler wrote: >Anna Fowles-Winkler wrote: > >>Paul DuBois wrote: >> Paul DuBois wrote: > At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote: > >Well, the function is called like this: > > > >mysql_real_query( mysql_connec

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Anna Fowles-Winkler wrote: > Paul DuBois wrote: > > > >Paul DuBois wrote: > > > > > >> At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote: > > >> >Well, the function is called like this: > > >> > > > >> >mysql_real_query( mysql_connection, query_string, strlen( query_string )); > > >> > > > >

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Paul DuBois wrote: > >Paul DuBois wrote: > > > >> At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote: > >> >Well, the function is called like this: > >> > > >> >mysql_real_query( mysql_connection, query_string, strlen( query_string )); > >> > > >> >Wouldn't that pass the correct length? > >>

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Paul DuBois
>Paul DuBois wrote: > >> At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote: >> >Well, the function is called like this: >> > >> >mysql_real_query( mysql_connection, query_string, strlen( query_string )); >> > >> >Wouldn't that pass the correct length? >> >> Not necessarily. > >Uhm... why no

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Paul DuBois wrote: > At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote: > >Well, the function is called like this: > > > >mysql_real_query( mysql_connection, query_string, strlen( query_string )); > > > >Wouldn't that pass the correct length? > > Not necessarily. Uhm... why not? Wouldn't strlen

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Paul DuBois
At 14:37 -0600 4/26/02, Anna Fowles-Winkler wrote: >Well, the function is called like this: > >mysql_real_query( mysql_connection, query_string, strlen( query_string )); > >Wouldn't that pass the correct length? Not necessarily. > >--Anna > >Paul DuBois wrote: > >> At 14:03 -0600 4/26/02, Anna

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Well, the function is called like this: mysql_real_query( mysql_connection, query_string, strlen( query_string )); Wouldn't that pass the correct length? --Anna Paul DuBois wrote: > At 14:03 -0600 4/26/02, Anna Fowles-Winkler wrote: > >Hi, > > > >I have an insert command that I'm executing th

Re: mysql_real_query and escaping a semicolon

2002-04-26 Thread Paul DuBois
At 14:03 -0600 4/26/02, Anna Fowles-Winkler wrote: >Hi, > >I have an insert command that I'm executing through the C API function >mysql_real_query. One of my values is a string like this: >'1;' > >When mysql_real_query sees the ;, it thinks it's the end of the >statement. That's unlikely. I'd

mysql_real_query and escaping a semicolon

2002-04-26 Thread Anna Fowles-Winkler
Hi, I have an insert command that I'm executing through the C API function mysql_real_query. One of my values is a string like this: '1;' When mysql_real_query sees the ;, it thinks it's the end of the statement. How can I prevent that from happening? Is there a way to escape it? Thanks very

Re: Escaping * character in a RLIKE? How? Help?

2001-07-14 Thread Paul DuBois
At 6:15 PM -0500 7/14/01, Paul DuBois wrote: >At 3:15 PM -0700 7/14/01, xris wrote: >>I have a very simple query that used to work and then recently stopped. It >>goes something like: >> >>SELECT name FROM Items WHERE category RLIKE '^\* new cat \*'; >> >>Now, I'm pretty familiar with how regex w

Re: Escaping * character in a RLIKE? How? Help?

2001-07-14 Thread Paul DuBois
At 3:15 PM -0700 7/14/01, xris wrote: >I have a very simple query that used to work and then recently stopped. It >goes something like: > >SELECT name FROM Items WHERE category RLIKE '^\* new cat \*'; > >Now, I'm pretty familiar with how regex works, and I was pretty sure that >when I put a \ in

Escaping * character in a RLIKE? How? Help?

2001-07-14 Thread xris
I have a very simple query that used to work and then recently stopped. It goes something like: SELECT name FROM Items WHERE category RLIKE '^\* new cat \*'; Now, I'm pretty familiar with how regex works, and I was pretty sure that when I put a \ in front of the * it would interpret it as a * i

Re: Escaping #

2001-05-24 Thread Dave Thomas
]> >CC: <[EMAIL PROTECTED]> >Subject: Escaping # >Date: Thu, 24 May 2001 13:14:36 +0200 (EET) > > >Hi, > >I have loads of # characters in my database and now I need to make a >duplicate of it (so assumably will have to escape the needed chracters >manually), but how c

Escaping #

2001-05-24 Thread Siim Einfeldt aka Itpunk
Hi, I have loads of # characters in my database and now I need to make a duplicate of it (so assumably will have to escape the needed chracters manually), but how could I escape #? Generally speaking it should be \#, right? But if do two INSERTs in a row for example: INSERT INTO table (one) VALU

RE: escaping semicolon in strings

2001-05-10 Thread j.urban
That SQL statement provided should work just fine without any escape sequences (at least as far as MySQL is concerned). The semicolons (;) should be treated as part of a literal string, and therefore, inserted into the image_data table. Perhaps you're running this script from some utility or som

RE: escaping semicolon in strings

2001-05-10 Thread Dave Emerson
sday, May 10, 2001 5:31 PM > To: Dave Emerson > Cc: [EMAIL PROTECTED] > Subject: Re: escaping semicolon in strings > > > On Thu, May 10, 2001 at 05:16:42PM -0400, Dave Emerson wrote: > > > I'm trying to store strings the database that contain html character > >

RE: escaping semicolon in strings

2001-05-10 Thread Dave Emerson
ODBC] > -Original Message- > From: j.urban [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 10, 2001 5:28 PM > To: Dave Emerson > Cc: [EMAIL PROTECTED] > Subject: Re: escaping semicolon in strings > > > How are you inserting the strings (ie C, Perl, etc)? > What is the ex

Re: escaping semicolon in strings

2001-05-10 Thread Jeremy Zawodny
On Thu, May 10, 2001 at 05:16:42PM -0400, Dave Emerson wrote: > I'm trying to store strings the database that contain html character > entities in them. It appears that the insert fails when it sees the > semicolon that terminates the entity. I've tried escaping it with \

Re: escaping semicolon in strings

2001-05-10 Thread j.urban
gt; It appears that the insert fails when it sees the semicolon that > terminates > the entity. I've tried escaping it with \ but that doesn't work. What's > the proper way to escape a semicolo

escaping semicolon in strings

2001-05-10 Thread Dave Emerson
I'm trying to store strings the database that contain html character entities in them. It appears that the insert fails when it sees the semicolon that terminates the entity. I've tried escaping it with \ but that doesn't work. What's the proper way to escape a semicolon