<% Option Explicit dim con,strsql,rec set con = Server.CreateObject("ADODB.Connection") con.open "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=localhost;UID=root;pwd=admin;database=med;option=16384;" strsql="select * from officer" set rec = Server.CreateObject("ADODB.RecordSet") rec.open strsql,con while not rec.EOF %> <table> <tr> <td><div align="center"><%=rec.Fields("of_username").Value%></div></td> <td><%=rec.Fields("of_password").Value%></td> </tr> <% rec.movenext wend %> </table> <% rec.close() con.close() set rec=nothing set con=Nothing %>
<%Option Explicit%> <!--#include file="includes/header.asp"--> <!--#include file="includes/menu.asp"--> <% dim con,sql,rec,i set con= Server.CreateObject("ADODB.Connection") con.open="DRVIER={MySQL ODBC 5.1.9 Drvier}; SERVER=localhost;UID=root;pwd=admin;database=med;option=16384" %> <!-- start --> <td class="f2" > <table style="width:95%"> <!-- start --> <!-- slid --> <div> <table border="0" cellspacing="0" cellpadding="0"> <% sql = "SELECT * FROM `news` WHERE `status` =1 AND `newstype` LIKE '%??????????%' OR `newstype` LIKE '%??????????%' ORDER BY `ddate` DESC " set rec = Server.CreateObject("ADODB.RecordSet") rec.open sql,con %> <tr> <td valign="top"><img src="medicines/images/h_news1.gif" border="0px"></td> </tr> <tr> <td valign="top" background="medicines/images/bg_Cwindow.gif"> <% if rec.EOF <> 0 then while not rec.EOF %> <table width="98%" border="0" cellpadding="0" cellspacing="0" style="padding: 2px;" align="center"> <tr align="left" > <td><%=rec.Fields("ddate").Value%> </td> </tr> <tr align="left" > <td><img src="medicines/images/down.gif" border="0px"> <a href="medicines/news/newreport_all.php?newsid=<%=rec.Fields("newsid").Value%>" target="bank" onclick="openWindow()"><%=rec.Fields("title").Value%></a> </td> </tr> <% rec.movenext wend end if %> </table> </td> </tr> <tr> <td valign="top"><img src="medicines/images/bottom_Cwindow.gif" border="0px"></td> </tr> </table> </div> </tr> </table> <!-- end --> <!--#include file="includes/footer.asp"-->
Quote:MySQL ODBC 5.1.9 Drvier
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง