Board index   FAQ   Search  
Register  Login
Board index php forum :: Database Other Database Engines

Postgresql Query Error

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

Moderators: macek, egami, gesf

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
leandroabilio
New php-forum User
New php-forum User
 
Posts: 1
Joined: Thu Oct 27, 2011 8:59 am

Return to Other Database Engines

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron