List Info

Thread: PostgreSQL backend for MAIA ...




PostgreSQL backend for MAIA ...
user name
2006-07-22 00:33:58
I just spent the past little bit trying to figure out why,
after changing 
from MySQL -> PostgreSQL for my backend, things were
looking "weird", and 
just clued into the why ...

In PostgreSQL, the 'received date' field in
spam-quarantine.php and non 
spam, have 'milliseconds' added onto it, so I'm getting
extra high rows, 
and wrapping on the date field ...

I'm not sure how easy it is to do 'db specific queries',
but changing the 
query to:

     $item_select = "SELECT maia_mail.id,
date_trunc('seconds', maia_mail.received_date) AS
received_date, maia_mail.score, " .
                      "maia_mail.sender_email,
maia_mail.subject, maia_mail.envelope_to " .
               "FROM maia_mail, maia_mail_recipients
" .
               "WHERE maia_mail.id =
maia_mail_recipients.mail_id " .
               "AND maia_mail_recipients.type = 'S'
" .
               "AND maia_mail_recipients.recipient_id
= ? " .
               "ORDER BY maia_mail." .
$sort_column . " " . $sort_order;

Fixes the wrapping issue ... the change being the
"date_trunc('seconds')" 
wrapper around received_date ...


----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email . scrappyhub.org                              MSN .
scrappyhub.org
Yahoo . yscrappy               Skype: hub.org        ICQ .
7615664
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )