返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来取得返回资料的字段数目。参数 result_id 为 odbc 返回 id 值。若发生错误则返回 -1。
odbc_pconnect
长期链接至 odbc 数据库。
语法: int odbc_pconnect(string dsn, string user, string password, int [cursor_type]);
返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来保持长期链接链接到 odbc 数据库,即使 php 程序结束,链接仍然存在,返回值为链接的代号 id 值。这对链接负责很重的系统可以加快链接的速度。参数 dsn 为资料来源名称 (data sources name)。参数 user 及 password 分别为链接的帐号及密码。参数 cursor_type 通常省略。
参考: odbc_connect()
odbc_prepare
预置 sql 指令。
语法: int odbc_prepare(int connection_id, string query_string);
返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来配置 sql query 指令。参数 result_id 为 odbc 返回 id 值。参数 query_string 即为预设的指令。
参考: odbc_execute()
odbc_num_rows
取得返回列数目。
语法: int odbc_num_rows(int result_id);
返回值: 整数
函数种类: 数据库功能
内容说明: 本函数用来取得返回列的数目。参数 result_id 为 odbc 返回 id 值。若有错误发生则返回 -1。
odbc_result
取得返回资料。
语法: string odbc_result(int result_id, mixed field);
返回值: 字符串
函数种类: 数据库功能
内容说明: 本函数用来取得返回的资料。参数 result_id 为 odbc 返回 id 值。参数 field 可以是数字类型,代表指定的字段序号 (从 1 开始);亦可以是字符串类型,为指定的字段名称。
| 对此文章发表了评论 |
