如何在Zend Framework中以這種方式使用UNION ALL
?PHP Zend Framework - 我如何使用union all?
(select id from astrology where commu_time_from <= '11:51' and commu_time_to >= '11:51' and user_id=1 and appo_date='03/01/2017') union all
(select id from facereading where commu_time_from <= '11:51' and commu_time_to >= '11:51' and user_id=1 and appo_date='03/01/2017') union all
(select id from numerology where commu_time_from <= '11:51' and commu_time_to >= '11:51' and user_id=1 and appo_date='03/01/2017') union all
(select id from palmistry where commu_time_from <= '11:51' and commu_time_to >= '11:51' and user_id=1 and appo_date='03/01/2017') union all
(select id from solutions where commu_time_from <= '11:51' and commu_time_to >= '11:51' and user_id=1 and appo_date='03/01/2017') union all
(select id from vastu where commu_time_from <= '11:51' and commu_time_to >= '11:51' and user_id=1 and appo_date='03/01/2017')
我還需要弄清楚如何跟蹤結果中的總行數。
這是正確的答案。應該被接受 – Darius