connection = int odbc_connect(string dsn, string user, string password)建立数据库连接,
$query_string = "查询记录的条件"
如:$query_string = "select * from table"
用$cur = int odbc_exec(int connection_id, string query_string)检索数据库,将记录集放入$cur变量中。
再用while (odbc_fetch_row($cur)){
$var1=odbc_result($cur,1);
$var2=odbc_result($cur,1);
...
}
读取odbc_exec()返回的数据集$cur。
最后是odbc_close(int connection_id)关闭数据库的连接。
odbc_result()函数是取当前记录的指定字段值。
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器