Achuthan <[EMAIL PROTECTED]> wrote: > [-- text/plain, encoding 7bit, charset: us-ascii, 31 lines --] > > hi all > I am facing a problem in fetching the data from two different tables > I have tables called A and B. > Thro PHP code i am trying to connect to MySQL to fetch the desired datas frm both A > & B > My code Goes like this > > "select ename,exp,salary from A Union select ename,exp,sal from B LIMIT 0, 30" > > Case1: > I could find the following inferences when i execute on my Local Host > - The Query is working very well & i could get the datas from A & B on my Localhost > My Localhost has PHP (4.2.3), MySQL(3.23.39) and phpMyAdmin(2.3.2) > I am happy with my Query when i execute. > > > Case2: > I could find the following inferences when i execute on the Online Server > - My Query is throwing the following error > You have an error in your SQL syntax near 'UNION select ename,exp,sal from B LIMIT > 0, 30. > My Online server has PHP (4.3.1), MySQL(3.23.54), phpMyAdmin(2.5.1) > What will be the rootcause for my problem can anyoen Help me out to find the Bug???
Your version of MySQL doesn't support UNION. UNION is implemented in MySQL 4.0.0. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]