Re: whats the best way to imput text and formated text into a mysql database

2003-02-10 Thread olinux
http://www.php.net/addslashes
http://www.php.net/stripslashes

--- ahimsa <[EMAIL PROTECTED]> wrote:
> Thank you so much everyone for all of your support! 
> 
> 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.  The problem is that this is not
> feasable for me to do this on so much text, besides
> its messy etc.  does anyone have any suggestions on
> the best way to imput text into a mysql database
> that is simple that will accept what ever text, It
> would be great if it could be formated text. But is
> this possible. Maybe i should be using a blob field
> instead of a text field or somethign. Im not sure. 
> Im using mysql with php in my forms.  i maybe need
> to do all of this differently. My goal is to imput
> pages and pages of text into text fields.  Thank you
> all so much.  Also Is it ok to write a thank you to
> people when they reply or is it standard etiquette
> to not reply ? 
> Thanks again so much. leeann
> 
>
-
> 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
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
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




Re: whats the best way to imput text and formated text into a mysql database

2003-02-10 Thread Kevin Smith
Hi,

If you are inputting text, perhaps you should create a simple HTML form and
use PHP to insert into the database for you.  You can use the PHP internal
function add_slashes($text) to automatically delimit everything for you.

If you don't know what PHP is or don't have it installed, then perhaps using
Perl DBI to do a similar thing?

If you are really stuck, but know you can ask an administrator to install
PHP for you, then come back to me and ask how to program it in PHP.

Also, it's entirely up to you if you want to thank someone for their
help...   Of couse, it would be nice if you did. ;)

Regards,

Kevin

- Original Message -
From: "ahimsa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 08, 2003 9:21 PM
Subject: whats the best way to imput text and formated text into a mysql
database


> Thank you so much everyone for all of your support!
> 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.  The problem is that this is not feasable for me
to do this on so much text, besides its messy etc.  does anyone have any
suggestions on the best way to imput text into a mysql database that is
simple that will accept what ever text, It would be great if it could be
formated text. But is this possible. Maybe i should be using a blob field
instead of a text field or somethign. Im not sure.  Im using mysql with php
in my forms.  i maybe need to do all of this differently. My goal is to
imput pages and pages of text into text fields.  Thank you all so much.
Also Is it ok to write a thank you to people when they reply or is it
standard etiquette to not reply ?
> Thanks again so much. leeann
>
> -
> 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
>



-
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




RE: whats the best way to imput text and formated text into a mysql database

2003-02-10 Thread Jennifer Goodie
You could have PHP escape it for you.  Look into the addslashes function.
It adds slashes to escape characters.
http://www.php.net/manual/en/function.addcslashes.php

If your server has magic quotes turned on it will automatically escape
characters, but it is not a good idea to rely on that.

If you want to thank someone, I would just reply to that person, not to the
list.

-Original Message-
From: ahimsa [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 08, 2003 1:21 PM
To: [EMAIL PROTECTED]
Subject: whats the best way to imput text and formated text into a mysql
database


Thank you so much everyone for all of your support!
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.  The problem is that this is not feasable for me to do this
on so much text, besides its messy etc.  does anyone have any suggestions on
the best way to imput text into a mysql database that is simple that will
accept what ever text, It would be great if it could be formated text. But
is this possible. Maybe i should be using a blob field instead of a text
field or somethign. Im not sure.  Im using mysql with php in my forms.  i
maybe need to do all of this differently. My goal is to imput pages and
pages of text into text fields.  Thank you all so much.  Also Is it ok to
write a thank you to people when they reply or is it standard etiquette to
not reply ?
Thanks again so much. leeann


-
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




Re: whats the best way to imput text and formated text into a mysql database

2003-02-10 Thread Keith C. Ivey
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




Re: whats the best way to imput text and formated text into a mysql database

2003-02-10 Thread Jerry
Where is the text coming from ?

With languages like php, there are loads of functions to escape things and
make sure that the text is ok

Jerry

- Original Message -
From: "ahimsa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 08, 2003 9:21 PM
Subject: whats the best way to imput text and formated text into a mysql
database


> Thank you so much everyone for all of your support!
> 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.  The problem is that this is not feasable for me
to do this on so much text, besides its messy etc.  does anyone have any
suggestions on the best way to imput text into a mysql database that is
simple that will accept what ever text, It would be great if it could be
formated text. But is this possible. Maybe i should be using a blob field
instead of a text field or somethign. Im not sure.  Im using mysql with php
in my forms.  i maybe need to do all of this differently. My goal is to
imput pages and pages of text into text fields.  Thank you all so much.
Also Is it ok to write a thank you to people when they reply or is it
standard etiquette to not reply ?
> Thanks again so much. leeann
>
> -
> 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
>


-
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