On 8 Feb 2003, at 13:21, ahimsa wrote:

> I asked a question re: a mysql post error when the text containd
> apostrophe and commas. I got feedback re: delimiting and putting a /
> before each comma and appostrophy.

No, it's \ (backslash), not / (slash), and I don't know what your 
problem with commas it, since they don't have to be escaped (though 
apostrophes, backslashes, and nulls do).

>  The problem is that this is not
> feasable for me to do this on so much text, besides its messy etc.

If you're using PHP, you can use addslashes() on strings when 
constructing your SQL statements.  Instead of

    $sql = "INSERT INTO table_name (text_column) VALUES ('$text')";

you can do something like

    $sql = "INSERT INTO table_name (text_column) VALUES ('" .
                addslashes($text) . "')";

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to