Fixes https://github.com/mautic/mautic/pull/268#issuecomment-92466581 where a sql error is generated under postgresql due to a bad query.
Fixes https://github.com/mautic/mautic/pull/268#issuecomment-92466581 where a sql error is generated under postgresql due to a bad query.

rcdelfin/mautic,rcdelfin/mautic,rcdelfin/mautic