GB | BIG5
|
| 首頁 > 編程技術 > Php > 正文 |
 |
| PHP4手冊:函數庫及函數(二十三) InterBase 資料庫函式庫 |
| http://netleader.126.com 星空浪子 (2001-04-18 14:23:14) |
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
--------------------------------------------------------------------------------
本函式庫共有 11 個函式
InterBase 是 Inprise 的資料庫系統,在 Windows 作業平台上的 Delphi 及 BCB 等開發工具中附有單機的版本供開發使用。更多有關 InterBase 的資訊,可以參考 http://www.interbase.com
ibase_connect: 開啟 InterBase 伺服器連線。
ibase_pconnect: 保持 InterBase 伺服器連線。
ibase_close: 關閉 InterBase 伺服器連線。
ibase_query: 送出一個 query 字串。
ibase_fetch_row: 傳回單列的各欄位。
ibase_free_result: 釋放傳回佔用記憶體。
ibase_prepare: 分析 SQL 語法。
ibase_bind: 連結 PHP 變數到 InterBase 參數。
ibase_execute: 執行 SQL 的指令區段。
ibase_free_query: 釋放查詢指令佔用記憶體。
ibase_timefmt: 設定時間格式。
--------------------------------------------------------------------------------
函式:ibase_connect()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_connect
開啟 InterBase 伺服器連線。
語法: int ibase_connect(string database, string [username], string [password]);
傳回值: 整數
函式種類: 資料庫功能
內容說明
本函式建立與 InterBase 伺服器的連線。參數 database 為欲使用的資料庫名稱。參數 username 及 password 可省略,分別為連線的帳號及密碼。
參考
ibase_pconnect() ibase_close()
--------------------------------------------------------------------------------
函式:ibase_pconnect()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_pconnect
保持 InterBase 伺服器連線。
語法: int ibase_pconnect(string database, string [username], string [password]);
傳回值: 整數
函式種類: 資料庫功能
內容說明
本函式建立與 InterBase 伺服器長期連線。參數 database 為欲使用的資料庫名稱。參數 username 及 password 可省略,分別為連線的帳號及密碼。本函式在 PHP 程式結束時並不會關閉資料庫,而等待下一次的連線,可以增加與資料庫連線速度。
參考
ibase_connect() ibase_close()
--------------------------------------------------------------------------------
函式:ibase_close()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_close
關閉 InterBase 伺服器連線。
語法: boolean ibase_close(int link_identifier);
傳回值: 布林值
函式種類: 資料庫功能
內容說明
本函式關閉與 InterBase 資料庫伺服器的連線。若無指定參數 link_identifier 則會關閉最的一筆連線。用 ibase_pconnect() 連線則無法使用本函式關閉。實際上本函式不是一定需要的,當 PHP 整頁程式結束,將會自動關閉與資料庫的非永久性 (non-persistent) 連線。成功傳回 true、失敗傳回 false 值。
參考
ibase_connect() ibase_pconnect()
--------------------------------------------------------------------------------
函式:ibase_query()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_query
送出一個 query 字串。
語法: int ibase_query(int link_identifier, string query);
傳回值: 整數
函式種類: 資料庫功能
內容說明
本函式送出 query 字串供 InterBase 做相關的處理或者執行。參數 link_identifier 為開啟的 ID。參數 query 為欲對資料庫下達的 SQL 字串。
--------------------------------------------------------------------------------
函式:ibase_fetch_row()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_fetch_row
傳回單列的各欄位。
語法: array ibase_fetch_row(int result);
傳回值: 陣列
函式種類: 資料庫功能
內容說明
本函式用來將查詢結果 result 之單列拆到陣列變數中。陣列的索引是數字索引,第一個的索引值是 0。若 result 沒有資料,則傳回 false 值。
--------------------------------------------------------------------------------
函式:ibase_free_result()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_free_result
釋放傳回佔用記憶體。
語法: boolean ibase_free_result(int result);
傳回值: 布林值
函式種類: 資料庫功能
內容說明
本函式可以釋放目前 InterBase 資料庫 query 傳回所佔用的記憶體。一般只有在非常擔心在記憶體的使用上可能會不足的情形下才可能用到本函式。PHP 程式會在結束時自動釋放。
--------------------------------------------------------------------------------
函式:ibase_prepare()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_prepare
分析 SQL 語法。
語法: boolean ibase_prepare(int link_identifier, string query);
傳回值: 布林值
函式種類: 資料庫功能
內容說明
本函式可用來分析 SQL 語法是否有錯誤,以供資料庫查詢。參數 link_identifier 為開啟的 ID。參數 query 為欲對資料庫下達的 SQL 字串。
--------------------------------------------------------------------------------
函式:ibase_bind()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_bind
連結 PHP 變數到 InterBase 參數。
語法: boolean ibase_bind(int query);
傳回值: 布林值
函式種類: 資料庫功能
內容說明
本函式將 PHP 變數與 InterBase 的 SQL 參數系結在一起。SQL 參數 (SQL parameter) 必須是類似 ":name" 的型式。若成功則傳回 true,反之傳回 false。
--------------------------------------------------------------------------------
函式:ibase_execute()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_execute
執行 SQL 的指令區段。
語法: int ibase_execute(int query);
傳回值: 整數
函式種類: 資料庫功能
內容說明
本函式用來執行經過 ibase_prepare() 處理過的 SQL 指令。
--------------------------------------------------------------------------------
函式:ibase_free_query()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_free_query
釋放查詢指令佔用記憶體。
語法: boolean ibase_free_query(int query);
傳回值: 布林值
函式種類: 資料庫功能
內容說明
本函式可以釋放目前 InterBase 資料庫 query 指令所佔用的記憶體。
--------------------------------------------------------------------------------
函式:ibase_timefmt()
--------------------------------------------------------------------------------
InterBase 資料庫函式庫
ibase_timefmt
設定時間格式。
語法: int ibase_timefmt(string format);
傳回值: 整數
函式種類: 資料庫功能
內容說明
本函式用來設定 SQL 指令傳回字串有關時間日期部份的字串格式。參數 format 為欲設定時間的格式。
(http://www.fanqiang.com)
進入【UNIX論壇】
|
|
| 相關文章 |
PHP4手冊:函數庫及函數(四十六) SNMP 網管函式庫 (2001-04-18 16:56:55) PHP4手冊:函數庫及函數(四十五) Solid 資料庫連結函式庫 (2001-04-18 16:54:16) PHP4手冊:函數庫及函數(四十四) 信號與共享記憶體函式庫 (2001-04-18 16:49:09) PHP4手冊:函數庫及函數(四十三) 常規表示法函式庫 (2001-04-18 16:40:33) PHP4手冊:函數庫及函數(四十二) URL 處理函式庫 (2001-04-18 16:37:13) PHP4手冊:函數庫及函數(四十一) PostgreSQL 資料庫函式庫 (2001-04-18 15:58:12) PHP4手冊:函數庫及函數(四十) PDF 格式檔案函式庫 - 2 (2001-04-18 15:53:53) PHP4手冊:函數庫及函數(四十) PDF 格式檔案函式庫 - 1 (2001-04-18 15:53:35) PHP4手冊:函數庫及函數(三十九) Perl 相容語法函式庫 (2001-04-18 15:45:08) PHP4手冊:函數庫及函數(三十八) Oracle 資料庫函式庫 (2001-04-18 15:43:09)
|
===更多相關=== |
|
|
 |
★ 樊強制作 歡迎分享 ★ |