|
![](/images/resource/spacer.gif) |
|
สอบถามการใช้ syntax ของ mysql ครับ(ขอคำแนะนำด้วยครับ) |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
select b.cid,b.hn,
a.lab_order_number,a.order_date,
lab_items_name_ref,
lab_order_result
from lab_head a
left outer join vn_stat b on a.vn=b.vn
left outer join lab_order c on a.lab_order_number=c.lab_order_number
where b.vstdate between"2020-01-01"and"2020-10-30"
and c.lab_items_code in(3205,3049,3559)
จะสอบถามว่าถ้าผมจะกำหนดค่าในการแสดงออกมาให้ในตารางให้ c.lab_items_code in(3205,3049,3559) ตรงส่วนนี้ค่า 3205 เป็น H แล้วก็ 3559 เป็น V ในตารางจะสามารถทำได้ไหมครับ แล้วต้องใช้การกำหนดเงื่อนไขไหมครับขอบคุณครับ
Tag : PHP, MySQL
![](/images/adv.jpg?v=1001)
|
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2020-10-21 10:10:04 |
By :
punza2020 |
View :
523 |
Reply :
1 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
Load balance : Server 04
|