 |
|
ขอความช่วยเหลือเรื่องการคิวรีแล้วส่งออกไปเป็น txt โดยมี , หรือ | คั่นระหว่างข้อมูลแต่ละฟิล |
|
 |
|
|
 |
 |
|
ทำการ UNION แล้ว ORDER BY และ LIMIT ครับ ทำได้ไม่ยาก
|
 |
 |
 |
 |
Date :
2012-01-26 17:44:20 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตัวอย่าง
Code
SELECT 'tb1' as tb,new_id,new_title,new_detail,new_date FROM tb_new
UNION
SELECT 'tb2' as tb,event_id,event_title,event_detail,event_date FROM tb_event
UNION
SELECT 'tb3' as tb,topic_id,topic_title,topic_detail,topic_date FROM tb_topic
ORDER BY new_date DESC LIMIT 0 , 10
|
 |
 |
 |
 |
Date :
2012-01-26 17:46:04 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับผม
|
 |
 |
 |
 |
Date :
2012-01-27 10:39:15 |
By :
noogong |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|