tailieunhanh - PHP HOW TO 3

PHP HOW−TO $connString .= " user=$this−username"; } if ($this−password) { $connString .= " password=$this−password"; } $connString .= " dbname=$this−databaseName"; $this−_connectionID = @pg_pConnect($connString); if ($this−_connectionID) { $this−_isPersistentConnection = true; } return $this−_connectionID; } // Returns: true on success, false on error Select // the database name to be used PostgreSQL // Note: function Not available function selectDB($dbName) { return false; } // Returns: the Recordset object disregard success // or failure Send the sql statement to the database server function execute($sql = "") { // Instantiate an object without considering whether . | PHP HOW-TO connString . user this- username if this- password connString . password this- password connString . dbname this- databaseName this- _connectionID @pg_pConnect connString if this- _connectionID this- _isPersistentConnection true return this- _connectionID Returns true on success false on error Select the database name to be used PostgreSQL Note function Not available function selectDB dbName return false Returns the Recordset object disregard success or failure Send the sql statement to the database server function execute sql Instantiate an object without considering whether the query return any results or not this- _queryID @pg_Exec this- _connectionID sql this- _tempResultObj new Recordset this- _queryID this- _insertQuery this- _queryID return this- _tempResultObj Returns the last error message from previous database operation function errorMsg this- _errorMsg @pg_errormessage this- _connectionID return this- _errorMsg Returns true on success false on failure Close the database connection function close if this- _queryIDList sizeof this- _queryIDList 0 while list _key _resultID each this- _queryIDList @pg_freeresult _resultID If its not a persistent connection then only the connection needs to be closed if this- _isPersistentConnection true return @pg_close this- _connectionID else return true A PRIVATE function used by the constructor function of the query object. insert the successful returned query id to the query id list. Used for later results cleanup. A private function that s never meant to be used directly F PostgreSQL Database Wrapper Examples 28 PHP HOW-TO function _insertQuery query_id this- _queryIDList query_id Class Name Recordset ------------------------------- class Recordset public variables var fields indicates that the current record position is before the first record in a Recordset object var BOF null indicates that the current record position is after the last record in a Recordset object var EOF null private .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.