#1182 Forums on Postgres are broken

v1.8RC
closed-fixed
nobody
5
2004-01-16
2004-01-12
No

in commentslib ~line 474, the nonstandard GREATEST
function breaks in postgres (and probably others)

postgres specific fix:
...a.`summary`,a.`smiley`,a.`message_id`,a.`in_reply_to`,a.`comment_rating`,
COALESCE(max(b.`commentDate`),a.`commentDate`) as
`lastPost`, count(b.`threadId`) as `replies`...

instead of COALESCE i recomend ADODB's IfNull function,
like

....a.`summary`,a.`smiley`,a.`message_id`,a.`in_reply_to`,a.`comment_rating`,
".$tikidb->IfNull( 'max(b.`commentDate`)',
'a.`commentDate'`)." as `lastPost`, count(b.`threadId`)
as `replies`....

see
http://phplens.com/lens/adodb/docs-adodb.htm#ifnull

Discussion

  • Florian Gleixner

    Logged In: YES
    user_id=183182

    Fixed. Thanks for the hint. Had problems with the group by
    in the left join. You could update your BRANCH-1-8 branch to
    see my changes. Sorry, forgot to note your work in the cvs
    log :-)

     
  • Florian Gleixner

    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks