title: Error Message: MySQL server has gone away
body: <pre><code>Warning: mysql_query() [function.mysql-query]:
  MySQL server has gone away in C:\wamp\www\amp10\hrd_consultant_ho_all_display.php on line 254
  
  Warning: mysql_query() [function.mysql-query]: Error reading result set's header in C:\wamp\www\amp10\hrd_consultant_ho_all_display.php on line 254
  
  Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\amp10\hrd_consultant_ho_all_display.php on line 254
  </code></pre>
  
  <p>I got this errors above from my query and i dont know how to resolve it. below is my codes. any help is accepted for a newbie... thanks</p>
  
  <pre><code>SELECT * , (SELECT CASE WHEN audited = 1 THEN 'YES' ELSE 'NO' END FROM activity_ref WHERE         
  activity_ref.ref_no = activity_plan.ref_no ) AS test_audited
  FROM 
  activity_plan
  inner join user on activity_plan.sales_officer=user.username
  INNER JOIN activity_liquid ON activity_plan.aplan_no = activity_liquid.aplan_no
  where activity_plan.date between '$date1' and '$date2' and user.branch='no' and     
  user.position='Consultant' and activity_plan.validate_1st_status!='pending'  order by     
  activity_plan.sales_officer asc,activity_plan.aplan_no asc  
  </code></pre>