|
Posted by bizt on 11/09/71 11:31
> Why don't you query both datasources seperately, and then in PHP decide
> which one to show in your unified 'resultset' ?
Thanks for the suggestion but as well as querying tables one after the
other, wouldnt this also restrict me to outputing them one after the
other. I kinda need to integrate them and then probably order them by
date.
Anyway, I see I need to gain a little understanding of the UNION
command in SQL which is fine. I have tried visiting a couple of
websites and they suggest all selected columns need to be the same data
type. This presents two problems for me:
1) Some columns have different names. For example, both have a text
data type column containing the body text of each article but one is
called 'desctext' and the other 'article'. Could this be worked around
by using the AS command (ie. article AS desctext)?
2) The column that provides the entry date, 'createdon', there are two
data types between the tables. One is datetime (in the format
'2005-11-08 12:04:43' and the other timestamp ('2005-11-08
12:04:43+01'). Is this an issue?
Unfortunately both tables were created a year apart and when I started
working on the later table, this idea wasnt thought of until now.
Burnsy
[Back to original message]
|