[DB-SIG] mysql string length?

Andrew Chambers andychambers2002 at yahoo.co.uk
Sat Apr 15 14:01:41 CEST 2006

* Lukasz Szybalski <szybalski at gmail.com> [2006-04-14 12:00:09 -0500]:

> INSERT INTO table_x( body)VALUES( '%s')" %  (body)
> this body is a string that varies in size. I keep getting an error if
> the size of body is longer then 255, and if its smaller everything
> goes smooth. Is this syntax correct? should '%s' be something else?

What is the datatype of body?  It sounds like it is CHAR(255).  Can you
change this to be TEXT?


Send instant messages to your online friends http://uk.messenger.yahoo.com 

More information about the DB-SIG mailing list