0

I having 2 database, both having same set of tables. I need latest three records from both db tables. Is it possible to concatenate 2 sql records in zend. because of object array concatenate is not working

I tried 'union' because of limit problem(we can give only one limit at the end of query), that not possible

4

1 回答 1

1

您可以. _LIMITUNION

从手册:

(SELECT a FROM t1 WHERE a=10 AND B=1 ORDER BY a LIMIT 3)
UNION
(SELECT a FROM t2 WHERE a=11 AND B=2 ORDER BY a LIMIT 3);
于 2013-08-26T07:48:16.860 回答