diff --git a/reference/sybase/functions/sybase-affected-rows.xml b/reference/sybase/functions/sybase-affected-rows.xml index ac9be4766f..7d864e5749 100644 --- a/reference/sybase/functions/sybase-affected-rows.xml +++ b/reference/sybase/functions/sybase-affected-rows.xml @@ -1,14 +1,14 @@ - - + sybase_affected_rows Gets number of affected rows in last query - - Description + + + &reftitle.description; intsybase_affected_rows resourcelink_identifier @@ -16,9 +16,40 @@ sybase_affected_rows returns the number of rows affected by the last INSERT, UPDATE or DELETE query on the - server associated with the specified link identifier. If the - link identifier isn't specified, the last opened link is assumed. + server associated with the specified link identifier. + + This command is not effective for SELECT statements, only on + statements which modify records. To retrieve the number of rows + returned from a SELECT, use sybase_num_rows. + + + + + &reftitle.parameters; + + + + link_identifier + + + If the link identifier isn't specified, the last opened link is assumed. + + + + + + + + + &reftitle.returnvalues; + + Returns the number of affected rows, as an integer. + + + + + &reftitle.examples; Delete-Query @@ -43,15 +74,17 @@ Records deleted: 10 + + + + &reftitle.seealso; - This command is not effective for SELECT statements, only on - statements which modify records. To retrieve the number of rows - returned from a SELECT, use sybase_num_rows. - - - See also sybase_num_rows. + + sybase_num_rows + + - + sybase_close Closes a Sybase connection - - Description + + + &reftitle.description; boolsybase_close resourcelink_identifier @@ -16,11 +16,6 @@ sybase_close closes the link to a Sybase database that's associated with the specified link link_identifier. - If the link identifier isn't specified, the last opened link is - assumed. - - - &return.success; Note that this isn't usually necessary, as non-persistent @@ -31,12 +26,42 @@ sybase_close will not close persistent links generated by sybase_pconnect. + + + + &reftitle.parameters; - See also - sybase_connect and - sybase_pconnect. + + + link_identifier + + + If the link identifier isn't specified, the last opened link is + assumed. + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.seealso; + + + sybase_connect + sybase_pconnect + + + + - + sybase_connect Opens a Sybase server connection - - Description + + + &reftitle.description; resourcesybase_connect stringservername @@ -16,14 +16,9 @@ stringcharset stringappname - - Returns a positive Sybase link identifier on success, or - &false; on failure. - sybase_connect establishes a connection to a - Sybase server. The servername argument has to be a valid - servername that is defined in the 'interfaces' file. + Sybase server. In case a second call is made to @@ -36,6 +31,65 @@ execution of the script ends, unless it's closed earlier by explicitly calling sybase_close. + + + + &reftitle.parameters; + + + + servername + + + The servername argument has to be a valid servername that is defined + in the 'interfaces' file. + + + + + username + + + Sybase user name + + + + + password + + + Password associated with username. + + + + + charset + + + + + + + appname + + + + + + + + + + + &reftitle.returnvalues; + + Returns a positive Sybase link identifier on success, or &false; on + failure. + + + + + &reftitle.examples; <function>sybase_connect</function> example @@ -51,12 +105,18 @@ sybase_close($link); + + + + &reftitle.seealso; - See also - sybase_pconnect and - sybase_close. + + sybase_pconnect + sybase_close + + - + sybase_data_seek Moves internal row pointer - - Description + + + &reftitle.description; boolsybase_data_seek resourceresult_identifier introw_number - - &return.success; - sybase_data_seek moves the internal row pointer of the Sybase result associated with the specified result identifier to pointer to the specified row number. The next call to sybase_fetch_row would return that row. + + + + &reftitle.parameters; - See also - sybase_fetch_row. + + + result_identifier + + + + + + + row_number + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.seealso; + + + sybase_fetch_row + + + + + sybase_deadlock_retry_count Sets the deadlock retry count - - Description + + + &reftitle.description; voidsybase_deadlock_retry_count intretry_count @@ -18,31 +19,54 @@ executing script is killed (for instance, by set_time_limit) or the query succeeds. + - &sybase.ct.only; - + + &reftitle.parameters; - - Values for retry_count - - - - -1 - Retry forever (default) - - - 0 - Do not retry - - - n - Retry n times - - - -
+ + + retry_count + + + + Values for retry_count + + + + -1 + Retry forever (default) + + + 0 + Do not retry + + + n + Retry n times + + + +
+
+
+
+
+ + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.notes; + &sybase.ct.only; + +
- + sybase_fetch_array Fetch row as array - - Description + + + &reftitle.description; arraysybase_fetch_array resourceresult - - Returns an array that corresponds to the fetched row, or - &false; if there are no more rows. - sybase_fetch_array is an extended version of sybase_fetch_row. In addition to storing the @@ -28,13 +24,40 @@ slower than using sybase_fetch_row, while it provides a significant added value. + + + + &reftitle.parameters; + + + + result + + + + + + + + + + + &reftitle.returnvalues; + + Returns an array that corresponds to the fetched row, or &false; if there + are no more rows. + - When selecting fields with identical names (for instance, in - a join), the associative indices will have a sequential number prepended. - See the example for details. + When selecting fields with identical names (for instance, in a join), the + associative indices will have a sequential number prepended. See the + example for details. + + + + &reftitle.examples; Identical fieldnames @@ -69,13 +92,19 @@ array(4) { + + + + &reftitle.seealso; - See also - sybase_fetch_row, - sybase_fetch_assoc and - sybase_fetch_object. + + sybase_fetch_row + sybase_fetch_assoc + sybase_fetch_object + + + sybase_fetch_assoc Fetch a result row as an associative array - - Description + + + &reftitle.description; arraysybase_fetch_assoc resourceresult - - Returns an array that corresponds to the fetched row, or - &false; if there are no more rows. - - - &sybase.ct.only; - sybase_fetch_assoc is a version of sybase_fetch_row that uses column names @@ -31,13 +25,47 @@ slower than using sybase_fetch_row, while it provides a significant added value. + + + + &reftitle.parameters; - See also - sybase_fetch_array, - sybase_fetch_object and - sybase_fetch_row. + + + result + + + + + + + + + &reftitle.returnvalues; + + Returns an array that corresponds to the fetched row, or &false; if there + are no more rows. + + + + + &reftitle.notes; + &sybase.ct.only; + + + + &reftitle.seealso; + + + sybase_fetch_row + sybase_fetch_array + sybase_fetch_object + + + + - + sybase_fetch_field Get field information from a result - - Description + + + &reftitle.description; objectsybase_fetch_field resourceresult intfield_offset - - Returns an object containing field information. - sybase_fetch_field can be used in order to - obtain information about fields in a certain query result. If - the field offset isn't specified, the next field that wasn't yet - retrieved by sybase_fetch_field is retrieved. + obtain information about fields in a certain query result. + + + + + &reftitle.parameters; + + + + result + + + + + + + field_offset + + + If the field offset isn't specified, the next field that wasn't yet + retrieved by sybase_fetch_field is retrieved. + + + + + + + + + &reftitle.returnvalues; + + Returns an object containing field information. The properties of the object are: @@ -53,10 +79,17 @@ + + + + &reftitle.seealso; - See also sybase_field_seek. + + sybase_field_seek + + - + sybase_fetch_object Fetch a row as an object - - Description + + + &reftitle.description; objectsybase_fetch_object resourceresult mixedobject - - Returns an object with properties that correspond to the - fetched row, or &false; if there are no more rows. - sybase_fetch_object is similar to sybase_fetch_assoc, with one difference - an object is returned, instead of an array. - Use the second object to specify the type of object - you want to return. If this parameter is omitted, the object will be of - type stdClass. + Speed-wise, the function is identical to + sybase_fetch_array, and almost as quick as + sybase_fetch_row (the difference is insignificant). - - - As of PHP 4.3.0, this function will no longer return numeric object members. - - - Old behaviour: - + + + + &reftitle.parameters; + + + + result + + + + + + + object + + + Use the second object to specify the type of object + you want to return. If this parameter is omitted, the object will be of + type stdClass. + + + + + + + + + &reftitle.returnvalues; + + Returns an object with properties that correspond to the fetched row, or + &false; if there are no more rows. + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.0 + + This function will no longer return numeric object members. + Old behaviour: + @@ -46,9 +88,9 @@ object(stdclass)(3) { string(3) "bar" } ]]> - - New behaviour: - + + New behaviour: + @@ -57,9 +99,17 @@ object(stdclass)(3) { string(3) "bar" } ]]> - - - + + + + + + + + + + + &reftitle.examples; <function>sybase_fetch_object</function> return as Foo @@ -80,17 +130,18 @@ object(stdclass)(3) { + + + + &reftitle.seealso; - Speed-wise, the function is identical to - sybase_fetch_array, and almost as quick as - sybase_fetch_row (the difference is insignificant). - - - See also - sybase_fetch_array and - sybase_fetch_row. + + sybase_fetch_array + sybase_fetch_row + + - + sybase_fetch_row Get a result row as an enumerated array - - Description + + + &reftitle.description; arraysybase_fetch_row resourceresult - - Returns an array that corresponds to the fetched row, or - &false; if there are no more rows. - sybase_fetch_row fetches one row of data from the result associated with the specified result identifier. - The row is returned as an array. Each result column is stored in - an array offset, starting at offset 0. Subsequent call to sybase_fetch_row would return the next row in the result set, or &false; if there are no more rows. + + + + &reftitle.parameters; + + + + result + + + + + + + + + + + &reftitle.returnvalues; + + Returns an array that corresponds to the fetched row, or &false; if there + are no more rows. Each result column is stored in an array offset, + starting at offset 0. + Data types @@ -56,15 +74,21 @@
+
+ + + &reftitle.seealso; - See also - sybase_fetch_array, - sybase_fetch_assoc, - sybase_fetch_object, - sybase_data_seek and - sybase_result. + + sybase_fetch_array + sybase_fetch_assoc + sybase_fetch_object + sybase_data_seek + sybase_result + +
- + sybase_field_seek Sets field offset - - Description + + + &reftitle.description; boolsybase_field_seek resourceresult @@ -18,14 +18,46 @@ sybase_fetch_field won't include a field offset, this field would be returned. + + + + &reftitle.parameters; + + + + result + + + + + + + field_offset + + + + + + + + + + + &reftitle.returnvalues; &return.success; + + + + &reftitle.seealso; - See also - sybase_fetch_field. + + sybase_fetch_field + + - + sybase_free_result Frees result memory - - Description + + + &reftitle.description; boolsybase_free_result resourceresult @@ -21,6 +21,29 @@ result memory will be freed. + + + &reftitle.parameters; + + + + result + + + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + - + sybase_get_last_message Returns the last message from the server - - Description + + + &reftitle.description; stringsybase_get_last_message @@ -16,10 +16,24 @@ sybase_get_last_message returns the last message reported by the server. + + + + &reftitle.returnvalues; - See also sybase_min_message_severity. + Returns the message as a string. + + + &reftitle.seealso; + + + sybase_min_message_severity + + + + - + sybase_min_client_severity Sets minimum client severity - - Description + + + &reftitle.description; voidsybase_min_client_severity intseverity @@ -16,14 +16,44 @@ sybase_min_client_severity sets the minimum client severity level. + - &sybase.ct.only; - + + &reftitle.parameters; - See also - sybase_min_server_severity. + + + severity + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.notes; + &sybase.ct.only; + + + + &reftitle.seealso; + + + sybase_min_server_severity + + + + - + sybase_min_error_severity Sets minimum error severity - - Description + + + &reftitle.description; voidsybase_min_error_severity intseverity @@ -16,14 +16,44 @@ sybase_min_error_severity sets the minimum error severity level. + - &sybase.db.only; - + + &reftitle.parameters; - See also - sybase_min_message_severity. + + + severity + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.notes; + &sybase.ct.only; + + + + &reftitle.seealso; + + + sybase_min_message_severity + + + + - + sybase_min_message_severity Sets minimum message severity - - Description + + + &reftitle.description; voidsybase_min_message_severity intseverity @@ -16,14 +16,44 @@ sybase_min_message_severity sets the minimum message severity level. + - &sybase.db.only; - + + &reftitle.parameters; - See also - sybase_min_error_severity. + + + severity + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.notes; + &sybase.db.only; + + + + &reftitle.seealso; + + + sybase_min_error_severity + + + + - + sybase_min_server_severity Sets minimum server severity - - Description + + + &reftitle.description; voidsybase_min_server_severity intseverity @@ -16,14 +16,44 @@ sybase_min_server_severity sets the minimum server severity level. + - &sybase.ct.only; - + + &reftitle.parameters; - See also - sybase_min_client_severity. + + + severity + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.notes; + &sybase.ct.only; + + + + &reftitle.seealso; + + + sybase_min_client_severity + + + + - + sybase_num_fields Gets the number of fields in a result set - - Description + + + &reftitle.description; intsybase_num_fields resourceresult - sybase_num_fields returns the number of - fields in a result set. - - - See also - sybase_query, - sybase_fetch_field and - sybase_num_rows. + sybase_num_fields returns the number of fields in a + result set. + + + &reftitle.parameters; + + + + result + + + + + + + + + + + &reftitle.returnvalues; + + Returns the number of fields as an integer. + + + + + &reftitle.seealso; + + + sybase_query + sybase_fetch_field + sybase_num_rows + + + + - + sybase_num_rows Get number of rows in a result set - - Description + + + &reftitle.description; intsybase_num_rows resourceresult - sybase_num_rows returns the number of rows - in a result set. - - - See also - sybase_num_fields, - sybase_query and - sybase_fetch_row. + sybase_num_rows returns the number of rows in a + result set. + + + &reftitle.parameters; + + + + result + + + + + + + + + + + &reftitle.returnvalues; + + Returns the number of rows as an integer. + + + + + &reftitle.seealso; + + + sybase_num_fields + sybase_query + sybase_fetch_row + + + + - + sybase_pconnect Open persistent Sybase connection - - Description + + + &reftitle.description; resourcesybase_pconnect stringservername @@ -16,10 +16,6 @@ stringcharset stringappname - - Returns a positive Sybase persistent link identifier on success, - or &false; on error. - sybase_pconnect acts very much like sybase_connect with two major differences. @@ -39,10 +35,72 @@ This type of links is therefore called 'persistent'. + + + + &reftitle.parameters; - See also sybase_connect. + + + servername + + + The servername argument has to be a valid servername that is defined + in the 'interfaces' file. + + + + + username + + + Sybase user name + + + + + password + + + Password associated with username. + + + + + charset + + + + + + + appname + + + + + + + + + &reftitle.returnvalues; + + Returns a positive Sybase persistent link identifier on success, or + &false; on error. + + + + + &reftitle.seealso; + + + sybase_connect + + + + - + sybase_query Sends a Sybase query - - Description + + + &reftitle.description; mixedsybase_query stringquery resourcelink_identifier + + sybase_query sends a query to the currently + active database on the server that's associated with the specified + link identifier. + + + + + &reftitle.parameters; + + + + query + + + + + + + link_identifier + + + If the link identifier isn't specified, the last opened link is + assumed. If no link is open, the function tries to establish a link as + if sybase_connect was called, and use it. + + + + + + + + + &reftitle.returnvalues; Returns a positive Sybase result identifier on success, &false; on error, or &true; if the query was successful but didn't return any columns. + + + + &reftitle.seealso; - sybase_query sends a query to the currently - active database on the server that's associated with the specified - link identifier. If the link identifier isn't specified, the last - opened link is assumed. If no link is open, the function tries to - establish a link as if sybase_connect was - called, and use it. - - - See also - sybase_select_db and - sybase_connect. + + sybase_select_db + sybase_connect + + - + sybase_result Get result data - - Description + + + &reftitle.description; stringsybase_result resourceresult @@ -18,14 +18,6 @@ Returns the contents of the cell at the row and offset in the specified Sybase result set. - - sybase_result returns the contents of one - cell from a Sybase result set. The field argument can be the - field's offset, or the field's name, or the field's table dot - field's name (tablename.fieldname). If the column name has been - aliased ('select foo as bar from...'), use the alias instead of - the column name. - When working on large result sets, you should consider using one of the functions that fetch an entire row (specified below). As @@ -42,6 +34,48 @@ sybase_fetch_object. + + + &reftitle.parameters; + + + + result + + + + + + + row + + + + + + + field + + + The field argument can be the field's offset, or the field's name, or + the field's table dot field's name (tablename.fieldname). If the + column name has been aliased ('select foo as bar from...'), use the + alias instead of the column name. + + + + + + + + + &reftitle.returnvalues; + + sybase_result returns the contents of one cell from a + Sybase result set. + + + - + sybase_select_db Selects a Sybase database - - Description + + + &reftitle.description; boolsybase_select_db stringdatabase_name @@ -16,25 +16,57 @@ sybase_select_db sets the current active database on the server that's associated with the specified link - identifier. If no link identifier is specified, the last opened - link is assumed. If no link is open, the function will try to - establish a link as if sybase_connect was - called, and use it. - - - &return.success; + identifier. Every subsequent call to sybase_query will be made on the active database. + + + + &reftitle.parameters; - See also - sybase_connect, - sybase_pconnect and - sybase_query + + + database_name + + + + + + + link_identifier + + + If no link identifier is specified, the last opened link is assumed. + If no link is open, the function will try to establish a link as if + sybase_connect was called, and use it. + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.seealso; + + + sybase_connect + sybase_pconnect + sybase_query + + + + + sybase_set_message_handler Sets the handler called when a server message is raised - - Description + + + &reftitle.description; boolsybase_set_message_handler callbackhandler @@ -18,24 +19,67 @@ global function, or use an array to specify an object reference and a method name. + - &sybase.ct.only; - - - The handler expects five arguments in the following order: message - number, severity, state, line number and description. The first four are - integers. The last is a string. If the function returns &false;, PHP - generates an ordinary error message. + + &reftitle.parameters; + + + + handler + + + The handler expects five arguments in the following order: message + number, severity, state, line number and description. The first four + are integers. The last is a string. If the function returns &false;, + PHP generates an ordinary error message. + + + + + connection + + + + + + + + + + &reftitle.returnvalues; &return.success; - - - The connection parameter was added in - PHP 4.3.5. - - + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 4.3.5 + + The connection parameter was added. + + + + + + + + + + &reftitle.examples; <function>sybase_set_message_handler</function> callback function @@ -93,6 +137,12 @@ + + + &reftitle.notes; + &sybase.ct.only; + + + sybase_unbuffered_query Send a Sybase query and do not block - - Description + + + &reftitle.description; resourcesybase_unbuffered_query stringquery resourcelink_identifier boolstore_result - - Returns a positive Sybase result identifier on success, or - &false; on error. - - - &sybase.ct.only; - sybase_unbuffered_query sends a query to the currently active database on the server that's associated with the specified @@ -49,11 +43,51 @@ results of an unbuffered query. + + + + &reftitle.parameters; - The optional store_result can be &false; to indicate - the resultsets shouldn't be fetched into memory, thus minimizing memory usage - which is particularly interesting with very large resultsets. + + + query + + + + + + + link_identifier + + + + + + + store_result + + + The optional store_result can be &false; to + indicate the resultsets shouldn't be fetched into memory, thus + minimizing memory usage which is particularly interesting with very + large resultsets. + + + + + + + + &reftitle.returnvalues; + + Returns a positive Sybase result identifier on success, or &false; on + error. + + + + + &reftitle.examples; <function>sybase_unbuffered_query</function> example @@ -81,11 +115,22 @@ sybase_close($dbh); + + + + &reftitle.notes; + &sybase.ct.only; + + + + &reftitle.seealso; - See also - sybase_query. + + sybase_query + +