i have 2 tables which are join together with the help of UNION and display the records using single while loop.
problem: now the problem is i want do display records from table(1) and table(2) separately but condition is using only single while loop.
here is the SQL:`
$sql = "(SELECT * FROM subject_first WHERE date BETWEEN '$user_from' AND '$user_to') UNION (SELECT * FROM subject_second WHERE date BETWEEN '$user_from' AND '$user_to')";
is there any way to do it?.sorry to say but i am new to PHP. any advise is appreciated.