Ah! Ok. Now I understand. Thank you very much Randy. I now have it up
and working and thanks to your reply I now understand exactly what is going
on.
Much appreciated!
Dan
-----Original Message-----
From: Randy Clamons [mailto:randy@stripped]
Sent: Tuesday, December 14, 2004 10:18 PM
To: Danny Willis; win32@stripped
Subject: RE: Help with using Text and Blob types
Danny,
That depends on what you are going to do with the text that comes out. When
you retrieve the text, the special characters will not be escaped. In other
words, it will include quotes, apostrophes, new line characters, etc.
You're using php, so I will guess you are putting the text on an html form.
As long as the retrieved text is going between the tags <textarea>
</textarea> on any form, you won't need to do a thing for it to display
properly on the form. The only problem you could see is if the saved text
includes the </textarea> tag. This happens to me when I am saving html in
the text column. In that case, I have to translate the textarea tags within
the text to something else when displaying the form, and remember to
translate it back when saving to the db.
If you are simply displaying the conent on your html page, you don't need to
worry about a thing!
Let me know how it comes out.
Randy Clamons
Systems Programming
Astro-auction.com
> ------------Original Message------------
> From: "Danny Willis" <danny.willis@stripped>
> To: randy@stripped, win32@stripped
> Date: Tue, Dec-14-2004 7:33 PM
> Subject: RE: Help with using Text and Blob types
>
> Ok,
>
> Is this all I need to do to store the data. What about reading it back
> out
> of the database?
>
> -----Original Message-----
> From: Randy Clamons [mailto:randy@stripped]
> Sent: Wednesday, December 08, 2004 5:48 PM
> To: Danny Willis; win32@stripped
> Subject: RE: Help with using Text and Blob types
>
> Danny,
>
> If you are storing text, make the column type text--depending on how
> much
> data you are storing, you may prefer tinytext, text, mediumtext or
> longtext.
> Then you just need to mysql_escape_string() before saving to db.
>
> Reference for mysql_escape_string():
> http://us2.php.net/manual/en/function.mysql-escape-string.php
>
> Randy Clamons
> Systems Programming
> Astro-auction.com
>
>
> > ------------Original Message------------
> > From: "Danny Willis" <danny.willis@stripped>
> > To: "'James Frankman'" <jfrankman@stripped>, win32@stripped
> > Date: Wed, Dec-8-2004 3:36 PM
> > Subject: RE: Help with using Text and Blob types
> >
> >
> > I'm using php, not asp/vb.
> >
> >
> > -----Original Message-----
> > From: James Frankman [mailto:jfrankman@stripped]
> > Sent: Wednesday, December 08, 2004 5:34 PM
> > To: Danny Willis
> > Subject: RE: Help with using Text and Blob types
> >
> > Assuming you are using vb or asp, this article help me out:
> > http://dev.mysql.com/tech-resources/articles/vb-blob-handling.html
> >
> > -----Original Message-----
> > From: Danny Willis [mailto:danny.willis@stripped]
> > Sent: Wednesday, December 08, 2004 3:26 PM
> > To: win32@stripped
> > Subject: Help with using Text and Blob types
> >
> >
> > I have a site with a form that takes in a message. At the moment I
> > have it
> > set as a VARCHAR but it isn't large enough. What's the trick to
> > changing
> > the type to a Text Type of Blob type and working with it? I've read
> > the
> > documentation but I still really don't understand what I need to
> change
> > in
> > my queries to work with these types.
> >
> > This is a priority so any help is greatly appreciated.
> >
> > Thanks.
> >
> >
>
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
> http://lists.mysql.com/win32?unsub=1
>
>