จากที่ดู คำสั่งผิดครับ
EurekaLog 6.1.04
Application:
-------------------------------------------------------
1.1 Start Date : Tue, 31 Jan 2012 15:48:12 +0700
1.2 Name/Description: HOSMy.exe - (BMS-HOSxP)
1.3 Version Number : 3.55.1.26
1.4 Parameters :
1.5 Compilation Date: Thu, 26 Jan 2012 14:54:57 +0700
1.6 Up Time : 49 seconds
Exception:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2.1 Date : Tue, 31 Jan 2012 15:49:01 +0700
2.2 Address : 02D6CE95
2.3 Module Name : HOSMy.exe - (BMS-HOSxP)
2.4 Module Version: 3.55.1.26
2.5 Type : Exception
2.6 Message : SQL Error: 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 form_name ='แรงงานต่างชาติ' order_date between '2012-01-27' and '2012-01-31' at line 1.
2.7 ID : 1265
2.8 Count : 1
2.9 Status : New
2.10 Note :
Custom Information:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8.1 Hospital Code : 11458 [รพร. จอมบึง]
8.2 Database Type : MySQL
8.3 Database Protocol : mysql-4.1 [5.1.30
Database hos @ 192.168.1.254]
8.4 :
8.5 No 1 : select lab_order_number from lab_head where and form_name ='แรงงานต่างชาติ' order_date between '2012-01-27' and '2012-01-31' and hn = '530003350'
8.6 No 2 : select count(hn) as cc from patient where hn='530003350'
8.7 No 3 : select count(hn) as cc from patient where hn='530003350'
8.8 DBMS Variables :
8.9 :
8.10 auto_increment_increment: 1
จากด้ารนบน select lab_order_number from lab_head **where and** form_name ='แรงงานต่าง
and มันอยุ่ผิดที่ครับ