Ciao!

Ho provato ad eseguire questa query:

select * from qc_news where homepage='TRUE' and status='TRUE' ORDER BY data AND ordine LIMIT 3

ma mi dà questo errore:

Warning: pg_exec(): Query failed: ERROR: argument of AND must be type boolean, not type date in /home/http/quadcham/public_html/test/utility/cont_home_sopra.php on line 39

Warning: pg_numrows(): supplied argument is not a valid PostgreSQL result resource in /home/http/quadcham/public_html/test/utility/cont_home_sopra.php on line 40


non posso ordinare i risultati per data? come posso fare per ottenere un ordinamento per data? dovrei usare il timestamp anzichè date?