|
Posted by bizt on 11/10/05 12:40
Ok, tried a simple example:
$select = "SELECT title, desctext FROM commnews UNION SELECT title,
article AS desctext FROM pressnews ORDER BY createdon";
$result = pg_exec ($db, $select);
But giving me the following error:
Warning: pg_exec(): Query failed: ERROR: column "createdon" does not
exist in /data/httpd/VirtualHosts/web-sandbox/htdocs/_testing/union.php
on line 34
The column 'createdon' does exist in both so I can only assume that my
ORDER BY command isnt properly formated. Is this the correct way to
ORDER a UNION SELECT?
Cheers
Burnsy
Navigation:
[Reply to this message]
|