Re: Problem using PostgreSQL 9.1 [message #2843 is a reply to message #2842] |
Wed, 14 December 2011 04:30 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I have been trying for several hours to get this working on my PC, and I now realise that it has nothing to do with permissions at all, it is all about casting the column 'visibility', which is an integer, to an interval.
In MySQL I would use "WHERE DATE_SUB(due_date, INTERVAL visibility DAY) <= '$today'"
In previous versions of Postgres the expression "WHERE DATE_SUB(due_date, visibility) <= '$today'" did not cause an error, but now it does.
I have been searching through the Postgres documentation trying to find out how I can cast an integer to an interval inside a function call, but I cannot find anything that works.
I'll keep looking, but if you find an answer first can you let me know?
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|