[Tutor] Mysql BLOB strangeness?

Adam Cripps kabads at gmail.com
Fri Mar 17 15:39:27 CET 2006


On 3/17/06, Kent Johnson <kent37 at tds.net> wrote:
> Adam Cripps wrote:
> > I'm trying to build a mini-CMS for my class to manage a single
> > webpage, using CGI and mysql. The children will be storing their main
> > content in a BLOB within a Mysql database.
> >
> > When I query the content column, I get a strange return like this:
> >
> > array('c', 'This is a test ')
> >
> > - when the only text I entered in was 'This is a test'.
>
> MySQL is apparently returning an array.array object, not a string. Just
> call tostring() on it to get a printable string.
>
> Why are you using a BLOB when the content is text?

Thanks.

I'm using BLOB because I want them to be able to write content that is
longer than 255 chars.

Adam
--
http://www.monkeez.org
PGP key: 0x7111B833


More information about the Tutor mailing list