I am trying to excute one mysql query in php.
$data=mysql_query("select distinct t_emp,count(t_emp), (select count(t_tittle) from task_data where status='Task completed' AND t_emp=a.t_emp)from task_data a group by t_emp");
while($test=mysql_fetch_array($data)){
}
I am getting below error
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/70/11725470/html/dhamutest.php on line 5