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
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
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:
&
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
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
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)
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
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
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
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
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
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
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
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
>
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
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
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
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
[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
>
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
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
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()
> &
--- 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
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
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
-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
-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
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;
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
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
') 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
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
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
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
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
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
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 ));
> > >> >
> > >
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?
> >>
>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
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
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
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
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
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
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
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
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
]>
>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
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
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
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
> >
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
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 \
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
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
55 matches
Mail list logo