$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()函数是取当前记录的指定字段值。
Copyright © 2019- huatuo7.cn 版权所有 湘ICP备2022005869号-9
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务