FAQ
Except that that page says:

A ''' inside a string quoted with '"' needs no special treatment and
need not be doubled or escaped. In the same way, '"' inside a string
quoted with ''' needs no special treatment.

So the double quotes inside single quotes should work.

And indeed, I tested this:

mysql> create table foo (f1 varchar(255));
Query OK, 0 rows affected (0.06 sec)

mysql> insert into foo VALUES ('test value to be deleted');
Query OK, 1 row affected (0.01 sec)

mysql> select * from foo;
+--------------------------+
f1 |
+--------------------------+
test value to be deleted |
+--------------------------+
1 row in set (0.00 sec)

mysql> update foo set f1='<textarea name="{ID_CAMPO}" cols="45"
rows="4" class="txts" d="{ID_CAMPO}">{ID_VALOR}</textarea>' where 1=1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select * from foo;
+--------------------------------------------------------------------------------------------------+
f1
+--------------------------------------------------------------------------------------------------+
<textarea name="{ID_CAMPO}" cols="45" rows="4" class="txts"
d="{ID_CAMPO}">{ID_VALOR}</textarea> |
+--------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Marcelo's running up against a different problem. Marcelo, have you
tried updating the value to be something like "123456789 123456789
123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 123456789 123456789 123456789 123456789 123456789
123456789 123456789 123456789 123456789 "? That is 150 characters --
9 chars for the #'s 1-9, plus one for the space makes 10. You can
easily see the groups using a space, and there are 15 groups of 10
characters each.

I'm guessing there's either a problem with: the original query (it
was obviously modified before copying and pasting) or there's a
limitation on the row length for whatever reason.

-Sheeri
On 12/1/05, Gleb Paharenko wrote:
Hello.



Use backslashes to escape double quotes. See:

http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html



LMS wrote:
Hi,
I can't save this:

--------
UPDATE [table] SET [filed]='
<textarea name="{ID_CAMPO}" cols="45" rows="4" class="txts"
id="{ID_CAMPO}">{ID_VALOR}
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Gleb Paharenko
/ /|_/ / // /\ \/ /_/ / /__ gleb.paharenko@ensita.net
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
<___/ www.mysql.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=awfief@gmail.com

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupmysql @
categoriesmysql
postedNov 30, '05 at 9:16p
activeDec 5, '05 at 3:52p
posts3
users3
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2021 Grokbase