พอจะพิมพ์ sticker lab ขึ้น sql error : unKnown column 'h.hn' on clause
.....ลองๆ ใช้คำสั่งข้างล่างดูนะครับ ปรับแก้คำสั่งนิดเดียว....
select h.lab_order_number,v.pcode,a.pcode as apcode, h.lab_receive_number,h.vn,h.hn,h.order_date ,h.order_time,
h.lock_result,h.receive_time as service13,h.report_time as service14 ,h.confirm_report,d.name as doctor_name,h.order_note,
concat(pt.pname,pt.fname,' ',pt.lname) as ptname , h.form_name ,v.rcpt_money as opaid,a.rcpt_money as ipaid ,ov.oqueue as qn,
v.age_y as vage_y,a.age_y as aage_y ,h.department,d.code ,d.shortname as d_order, v.dx_doctor , d2.shortname as dx_doctor_name,l2.*,l3.*
from lab_order l2,lab_items l3,lab_head h left outer join patient pt on pt.hn=h.hn
left outer join doctor d on d.code=h.doctor_code
left outer join vn_stat v on v.vn=h.vn
left outer join an_stat a on a.an=h.vn
left outer join ovst ov on ov.vn=h.vn
left outer join doctor d2 on d2.code = v.dx_doctor
where h.lab_order_number in (4929680) and h.lab_order_number = l2.lab_order_number
and l2.lab_items_code=l3.lab_items_code
order by h.order_date,h.order_time
limit 1
....ถ้าแก้ไขคำสั่งของรายงาน พอแก้ไขแล้วอย่าลืมตรวจสอบ parameter ด้วยนะครับ ...
![ยิ้มกว้างๆ :D](https://hosxp.net/smf2/Smileys/default/cheesy.gif)
....