![]() |
How to count total records from two different tables using UNION - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to count total records from two different tables using UNION (/showthread.php?tid=41706) |
How to count total records from two different tables using UNION - El Forum - 05-14-2011 [eluser]ram reddy[/eluser] Hi to all , I am try to count total records from two different tabels , they have different values . like Table1- id , post_id, user_id, date Table2- id , Shared_id, user_id, date . If i call the query to count records , query result is 7 but 28 records in both tables. How solue this problem; Note : I am using UNION in Query to show recent updates in user profile How to count total records from two different tables using UNION - El Forum - 05-14-2011 [eluser]ClaudioX[/eluser] Will help if u post your query |