PHP Developer’s Dictionary IT-SC book 445 The mysql_data_seek() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, moves the internal row pointer for the result set referenced by the result_identifier to the row_number . The next call to mysql_fetch_row() would then return that row. Note that row numbers start with 0. mysql_db_name() Syntax int mysql_db_name (int result, int row [, mixed field]) Description The mysql_db_name() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, is used to traverse the list of names created by the mysql_list_dbs() function. The result parameter indicates which result set to use, and the row and optional field parameters indicate which cell in the result set. A FALSE value is returned on error. mysql_db_query() Syntax int mysql_db_query (string database, string query [, int link_identifier]) Description The mysql_db_query() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, sends the query to the database for execution utilizing the link_identifier or the last opened link. If no link exists, an attempt will be made to create one as though msql_connect() were called with no arguments. This function is equivalent to msql() . mysql_drop_db() Syntax int mysql_drop_db (string database_name [, int link_identifier]) Description PHP Developer’s Dictionary IT-SC book 446 The mysql_drop_db() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, attempts to remove the database_name from the server associated with the link_identifier . The return value is TRUE on success and failure otherwise. This function is identical to mysql_dropdb() . mysql_errno() Syntax int mysql_errno ([int link_identifier]) Description The mysql_errno() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns the numerical value of the error message last gen erated on the link_identifier connection. The return value is 0 if no error occurred. mysql_error() Syntax string mysql_error ([int link_identifier]) Description The mysql_error() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns the text error of the last message associated with the link_identifier connection or an empty string if no error occurred. mysql_fetch_array() Syntax array mysql_fetch_array (int result [, int result _type]) Description The mysql_fetch_array() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, fetches a row from the result set into an associative array. This extends the mysql_fetch_row() function because in addition to storing PHP Developer’s Dictionary IT-SC book 447 data in the numeric indices of the array, it also stores the data in associative indices where the field names are the keys. Note that if two columns share the same name, use the numeric index or an alias; otherwise, the last column listed takes precedence. The result_type parameter can be MYSQL_ASSOC, MYSQL_NUM, or MYSQL_BOTH . mysql_fetch_field() Syntax object mysql_fetch_field (int result [, int field_offset]) Description The mysql_fetch_field() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, retrieves column information from the result set and returns it as an object. If a field_offset isn't specified, the next field that would be retrieved by mysql_fetch_field() is returned. The object has the following properties. Name Column Name table Name of the table the column belongs to max_length Maximum length of the column not_null 1 if the column cannot be null primary_key 1 if the column is a primary key unique_key 1 if the column is a unique key multiple_key 1 if the column is a non-unique key numeric 1 if the column is numeric blob 1 if the column is a BLOB type The type of the column unsigned 1 if the column is unsigned zerofill 1 if the column is zero-filled mysql_fetch_lengths() Syntax array mysql_fetch_lengths (int result) Description PHP Developer’s Dictionary IT-SC book 448 The mysql_fetch_lengths() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns a zero-based array with the lengths of each field in the last row fetched of the result set. mysql_fetch_object() Syntax object mysql_fetch_object (int result [, int result_type]) Description The mysql_fetch_object() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns an object with properties that belong to the row fetched in the result set. To access data in the object, you must use the field names and not their offsets. The optional parameter result_type can take the values MYSQL_ASSOC , MYSQL_NUM , and MYSQL_BOTH . The performance of this function matches the mysql_fetch_array() function, and is only slightly behind the mysql_fetch_row() function; the performance difference is negligible. mysql_fetch_row() Syntax array mysql_fetch_row(int result) Description The mysql_fetch_row() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns an enumerated array for a row in the result set or FALSE if no rows are left. The columns of the row are in the array at a zero- based offset. mysql_field_name() Syntax string mysql_field_name (int result, int field_index) Description PHP Developer’s Dictionary IT-SC book 449 The mysql_field_name() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns the name of the field referenced by the field_index in the result set. Note that the index is zero based. mysql_field_seek() Syntax int mysql_field_seek (int result, int field_offset) Description The mysql_field_seek() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, seeks to the field_offset in the result set. If the next call to mysql_fetch_field() doesn't include an offset, this field will be returned. mysql_field_table() Syntax string mysql_field_table (int result, int field_offset) Description The mysql_field_table() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns the name of the table that the field specified by the field_offset in the result set is in. For backward capability, mysql_fieldtable() can also be used. mysql_field_type() Syntax string mysql_field_type (int result, int field_offset) Description The mysql_field_type() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns the type of the field specified by the field_ . PHP Developer’s Dictionary IT-SC book 445 The mysql_data_seek() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, moves the. link_identifier]) Description PHP Developer’s Dictionary IT-SC book 446 The mysql_drop_db() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, attempts. result) Description PHP Developer’s Dictionary IT-SC book 448 The mysql_fetch_lengths() function, which is available from PHP 3.0 to PHP 3.0.16 along with PHP 4.0 and higher, returns