Postgresql Query Error

Do you have questions regarding other database enginges (not MySQL) -- ask here!

Moderators: macek, egami, gesf

leandroabilio
New php-forum User
New php-forum User
Posts: 1
Joined: Thu Oct 27, 2011 8:59 am

Postgresql Query Error

Postby leandroabilio » Thu Oct 27, 2011 9:03 am

What's wrong with it?

$query = "SELECT DATE(calldate) AS Dat, sum(billsec) AS duration ,count(1) AS callcount FROM cdr WHERE calldate BETWEEN DATE_SUB(NOW(),INTERVAL '0:5:0'DAY_SECOND) AND NOW() GROUP BY date(calldate)";

output:
PHP Warning: pg_query(): Query failed: ERROR: syntax error at or near "DAY_SECOND" at character 142

Return to “Other Database Engines”

Who is online

Users browsing this forum: Google [Bot] and 1 guest