cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorbjoern Ravn Andersen <>
Subject Re: SQLProcessor - MySQL - TEXT type fields problem
Date Wed, 29 Mar 2000 01:04:10 GMT
On Wed, 15 Mar 2000, Rob Parker wrote:

> Thanks for the suggestions, I have a work around, but not a reason yet.
> Further details below...
> I'm using mm.mysql-jdbc1.2b driver
> Win NT4 sp5
> MySQL Win32 3.22.32
> Below are the sample queries (and results) if I put through cocoon, if I run
> the queries through a standalone servlet, the output is fine. The
> description
> field is of type text.
> select description from product;
> [B@51bcf84a
> select substring(description,0) from product;
> select substring(description,1) from product;
> This is a good description

I have an identical behaviour with this snippet:

select as id, 
       items.owner as owner, 
       ceiling(items.size/1024) as size, 
       items.entered as entered,
       to_days(items.entered) as tde,
       date_format( items.entered, "%Y-%m-%d %H:%i") as enteredformatted,
       mime.mimetype as mimetype,
       users.login as login
from items, mime, users
  where (year(entered) = {@y}) and
        (month(entered) = {@m}) and
        (items.mimeid = mime.mimeid) and
        (users.userid = items.owner)
order by tde desc, entered
<!-- sort reversibly by date and then chronologically in the day -->

which among a lot of other stuff produces:

<entered>2000-03-27 08:12:42.0</entered><tde>730571</tde><enteredformatted>[B@80d35f5</enteredformatted><mimetype>message/rfc822

The "entered" field is a datetime.  This got me the correct result just
before I made the query more complex by requesting information from
multiple tables and using "as" to name them simpler.

Best regards,
  Thorbjørn Ravn Andersen               " Bells!"

View raw message