hi,
i wanna print the result in a table but i am failing to do so..
other query in my table are working but dont knw why this query is not displaying in the table
SELECT user_profile.user_id, user_profile.user_name, payroll.salary, payroll.hra, payroll.da, payroll.pf, payroll.nsa, payroll.ince, user_profile.desig, user_data.period, user_data.work_hours
FROM payroll, user_profile, user_data
WHERE user_profile.desig = payroll.desig and user_profile.user_id='a1' and user_data.user_id='a1'
a little help would be greate ful .. i ran this query on php my admin it is displaying the result ..
please guide me on how i can display this in my html table .
$sql="SELECT user_profile.user_id, user_profile.user_name, payroll.salary, payroll.hra, payroll.da, payroll.pf, payroll.nsa, payroll.ince, user_profile.desig, user_data.period, user_data.work_hours
FROM payroll, user_profile, user_data
WHERE user_profile.desig = payroll.desig and user_profile.user_id='a1' and user_data.user_id='a1'";
$dat=mysql_query($sql);
while($row=mysql_fetch_row($dat))
{
echo"<tr><td>".$row[user_profile.user_id]."</td>";
echo"<td>".$row[$user_name]."</td>";
echo"<td>".$row[salary]."</td>";
echo"<td>".$row[hra]."</td>";
echo"<td>".$row[da]."</td>";
echo"<td>".$row[pf]."</td>";
echo"<td>".$row[nsa]."</td>";
echo"<td>".$row[ince]."</td>";
echo"<td>".$row[desig]."</td>";
echo"<td>".$row[period]."</td></tr>";
}
please help me :(