Try this:
select cast(max(messages.posted) as date) as lastpost
from threads
join messages on threads.id=messages.threadidfk
where threads.id=12
Extra cast info:
http://dev.mysql.com/doc/mysql/en/Charset-CAST.html
http://dev.mysql.com/doc/mysql/en/Cast_Functions.html
Oliver Tupman
Alex Skinner wrote:
Hi,
THought id see if anyone had had the same issue with mysql before i
through the server out the window
I have a forum app which needs to work out on threads when the last post
was to a particular thread
V easy no probs there then but Mysql or more likely cf (but i wanna
blame mysql) is returning the aggregated field as binary :-) nice aye.
query is below
select max(messages.posted) as lastpost
from threads
join messages on threads.id=messages.threadidfk
where threads.id=12
Now it works fine querying mysql directly so yes it is something with cf
or JDBC driver any ideas ?
Alex
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.657 / Virus Database: 422 - Release Date: 13/04/2004
--
Oliver Tupman
Key Systems Geotechnical
--
These lists are syncronised with the CFDeveloper forum at
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by
activepdf.com*
*Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
*Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*
To unsubscribe, e-mail: [EMAIL PROTECTED]