1. Trang chủ
  2. » Công Nghệ Thông Tin

PHP Developer''''s Dictionary- P98 docx

5 232 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 362,15 KB

Nội dung

PHP Developer’s Dictionary IT-SC book 485 Description The pg_loreadall() function, which is available in PHP 3.0 and higher, reads an entire large object referenced by the fd parameter and returns its contents directly to the browser. This is often used for sound or image data. pg_lounlink() Syntax void pg_lounlink (int conn, int lobjid) Description The pg_lounlink() function, which is available in PHP 3.0 and higher, deletes the large object referenced by the lobjid parameter. pg_lowrite() Syntax int pg_lowrite (int fd, string buf) Description The pg_lowrite() function, which is available in PHP 3.0 and higher, attempts to write the buf to the large object and returns the number of bytes written or FALSE if an error occurs. pg_numfields() Syntax int pg_numfields (int result_id) Description PHP Developer’s Dictionary IT-SC book 486 The pg_numfields() function, which is available in PHP 3.0 and higher, returns the number of fields in the result set referenced by the result_id parameter and returns FALSE on error. pg_numrows() Syntax int pg_numrows (int result_id) Description The pg_numrows() function, which is available in PHP 3.0 and higher, returns the number of rows in the result set referenced by the result_id parameter and returns FALSE on failure. pg_options() Syntax string pg_options(int connection_id) Description The pg_options() function, which is available in PHP 3.0 and higher, returns a string containing the options for the given connection_id . pg_pconnect() Syntax int pg_pconnect (string host, string port, string options, string tty, string dbname) Description The pg_pconnect() function, which is available in PHP 3.0 and higher, opens a persistent connection to a PostgreSQL database and returns the connection index on success, and FALSE otherwise. A persistent connection is not destroyed when a script completes its processing. PHP Developer’s Dictionary IT-SC book 487 pg_port() Syntax int pg_port (int connection_id ) Description The pg_port() function, which is available in PHP 3.0 and higher, returns the port used for the given connection_id . pg_result() Syntax mixed pg_result (int result_id, int row_number ,mixed fieldname) Description The pg_result() function, which is available in PHP 3.0 and higher, returns data from the result set identified by the result_id parameter at the location referenced by row_number and fieldname . For fieldname , you may use the name or the zero- based column number. pg_tty() Syntax string pg_tty (int connection_id) Description The pg_tty() function, which is available in PHP 3.0 and higher, returns the tty associated with the given connection_id . Sybase The Sybase functions enable you to access data in a Sybase database. More information can by found at http://www.Sybase.com . The following example opens a connection to the users database and retrieves user123's password from the user table: PHP Developer’s Dictionary IT-SC book 488 <? $sybase_db = sybase_connect("users","username","password"); $sybase_result_id = sybase_query ("select password from user where username='user123'",$sybase_db) $sybase_row = sybase_fetch_row ($sybase_result_id); echo $sybase_row[0]; sybase_close ($sybase_db); ?> sybase_affected_rows() Syntax int sybase_affected_rows ([int link_identifier]) Description The sybase_affected_rows() function, which is available in PHP 3.0.6 and higher, returns the number of rows affected by the last insert, update, or delete statement performed using the connection specified by the link_identifier . The function is not useful for select statements because it reports only the number of rows modified by a statement. The sybase_num_rows() function should be used to examine the results of a select statement. sybase_close() Syntax int sybase_close (int link_identifier) Description The sybase_close() function, which is available in PHP 3.0 and higher, closes the link referenced by the link_identifier and returns TRUE on success and FALSE otherwise. This function isn't normally used because connections are automatically closed at the end of a script's processing. sybase_connect() Syntax PHP Developer’s Dictionary IT-SC book 489 int sybase_connect (string servername , string username , string password) Description The sybase_connect() function, which was added in PHP 3.0.7 and PHP 4.0, tries to establish a connection to a Sybase server and return a link identifier. If a connection already exists, its link identifier will be returned instead. The connection lasts until sybase_close() is called or the script finishes processing. sybase_data_seek() Syntax int sybase_data_seek (int result_identifier, int row_number) Description The sybase_data_seek() function, which is available in PHP 3.0 and higher, moves the internal row pointer for the result set indicated by the result_identifier to the corresponding row_number . This causes the next call to sybase_fetch_row() to use this row_number if none is specified. sybase_fetch_array() Syntax int sybase_fetch_array (int result) Description The sybase_fetch_array() function, which is available in PHP 3.0 and higher, returns an array that corresponds to the row fetched from the result set. Data in the return array is available by both numerical and associative indices. sybase_fetch_field() Syntax object sybase_fetch_field (int result, int field_offset) . PHP Developer’s Dictionary IT-SC book 485 Description The pg_loreadall() function, which is available in PHP 3.0 and higher, reads an entire large. pg_numfields (int result_id) Description PHP Developer’s Dictionary IT-SC book 486 The pg_numfields() function, which is available in PHP 3.0 and higher, returns the number of fields. processing. PHP Developer’s Dictionary IT-SC book 487 pg_port() Syntax int pg_port (int connection_id ) Description The pg_port() function, which is available in PHP 3.0 and higher,

Ngày đăng: 07/07/2014, 05:20

TỪ KHÓA LIÊN QUAN