UNION ALL query help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am received the error message:

Unknown column 'title' in 'field list'

from the query below.  I am not understanding what I have done wrong.  The
goal of the query is with for a RSS feed determining the 15 most current
articles.

Ron



SELECT title, content_date, content, reference FROM ( (

SELECT `page_title`, `last_update`, 'article', `reference` FROM
`user_pages` WHERE `include_in_highlights` =1 ORDER BY `last_update` DESC
LIMIT 15

) UNION ALL (

SELECT `blog`.`entry_title`, `blog`.`entry_date`, `blog`.`entry`,
`blog`.`reference` FROM blog WHERE blog_owners_reference =1 ORDER BY
blog.entry_date DESC, blog.reference DESC LIMIT 15

) ) AS rss_feed ORDER BY rss_feed.content_date DESC LIMIT 15


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux