I am trying to fetch values from two tables with the help of join statements. if the two tables are having same field name(which i am not going to use in joining). how to differeciate them and get their values.
$query=mysql_query("SELECT *, tbl1.enableFlag as tbl1_enableFlag, tbl2.enableFlag as tbl2_enableFlag FROM tbl1, tbl2 WHERE tbl1.id=tbl2.id");
while($r=mysql_fetch_array($query))
{
$fetch[]=$r;
}
You'll then have a couple of fields called tbl1_enableFlag and tbl2_enableFlag respectively that contain the data from each table.