Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? in /home/agenciadoradio/public_html/library/db.php on line 40

Warning: pg_query() expects parameter 1 to be resource, null given in /home/agenciadoradio/public_html/library/db.php on line 160

Warning: pg_last_error() [function.pg-last-error]: No PostgreSQL link opened yet in /home/agenciadoradio/public_html/library/db.php on line 162
ERRO NA QUERY =>>>> select N.codigo_noticia,N.titulo_noticia,to_char(N.datapublicacao_noticia,'DD/MM/YYYY') as datapublicacao_noticia,SUBSTRING(N.codigo_noticia,1,4) as projeto, uf.sigla_uf, D.codigo_uf from noticia.noticia AS N LEFT JOIN noticia.noticia_responsavel AS NR ON N.codigo_noticia = NR.codigo_noticia LEFT JOIN noticia.destino_noticia AS D ON N.codigo_noticia = D.codigo_noticia LEFT JOIN uf ON D.codigo_uf = uf.codigo_uf LEFT JOIN projeto AS P ON SUBSTRING(N.codigo_noticia,1,4) = P.codigo_projeto where (N.datapublicacao_noticia >= '1000-01-01' and N.datapublicacao_noticia <= '5000-01-01' and N.datapublicacao_noticia <= NOW()) and (N.codigo_noticia like '%%' or N.titulo_noticia like '%%') and (N.codigo_noticia like '%%') and P.id_tipoprojeto = 1 GROUP BY N.codigo_noticia, N.titulo_noticia, datapublicacao_noticia, projeto, uf.sigla_uf, D.codigo_uf, N.datapublicacao_noticia order by N.datapublicacao_noticia desc
Result=
165