Error:

The mysql database returned an error while processing your request.

The SQL statement was: SELECT count(*) from patient_messages where patient_id= and have_read!=1 and status='Finished' and to_trash=0;

The database returned this: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and have_read!=1 and status='Finished' and to_trash=0' at line 1

Other info:

$user_data{_cgifunction}=search
$user_data{_layout}=new_patient_header_1223