 |
|
ดึงข้อมูลจาก database ใน 1 ฟิลด์แล้วต้องการให้ข้อมูลที่ดึงมาปัดค่าแต่ละตัวเป็น , (comma) ค่ะ |
|
 |
|
|
 |
 |
|
ทำได้ล่ะค่ะ
|
 |
 |
 |
 |
Date :
2012-01-10 17:04:35 |
By :
teeraporn.r |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตกลงทำยังไงครับ 
|
 |
 |
 |
 |
Date :
2012-01-10 17:44:24 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (ASP)
<%
Set rsc=Server.CreateObject("ADODB.Recordset")
sqlc="select distinct(b.section_name) , a.section_id , a.related_comid,a.key_id from dbo.law_related_keyrequire a , dbo.section b where a.section_id=b.section_id and a.related_comid='754' and a.law_country_id='3' and a.law_id='10' and a.law1_id='8' and a.law2_id='14' and a.title_id='92' and a.key_id='7' "
rsc.open sqlc,Conn,1,3
if not rsc.eof then
do while not rsc.eof
%>
<%=rsc("section_name")%> ,
<%
rsc.movenext
loop
end if%>
ก็แค่ใส่ , หลัง rsc("section_name") ค่ะ ไม่รู้มีวิธีอื่นไหม แต่ผลลัพธ์ก็ออกมาได้ตามที่ต้องการค่ะ 
|
 |
 |
 |
 |
Date :
2012-01-10 17:47:21 |
By :
teeraporn.r |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2012-01-10 17:57:18 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|