|
![](/images/resource/spacer.gif) |
|
สอบถามการค้นหาข้อมูล mysql หน่อยครับ ผมจะเอา 2 ฟิลด์มา รวมกัน แล้วค้นหา มีวิธีไหมคับ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ได้ครับ ใช้ concat_ws แทน concat
Code (SQL)
select * from user where (user_no like '%$keyword%' or concat_ws(' ',user_prefix,user_name) like '%$keyword%')
ขอบคุณครับ
|
![](/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 :
2017-05-12 15:51:58 |
By :
ilikeit |
|
![](/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
|