Sybase offers an industrial-strength database that stands among other big competitors such as Oracle, Informix, and IBM's DB2. Unlike these other databases, Sybase is more available to developers with small budgets because of partnerships with application vendors. InterShop's electronic commerce server comes with a Sybase database. Microsoft's SQL Server 6.5 is a dressed-up version of Sybase. In fact, PHP's Sybase functions are able to connect to SQL Server databases.
lists all mssql_ aliases
When support for Sybase is compiled for PHP, one of two libraries may be used. One is the older DB-Library. The other is its replacement, Client-Library. These two libraries are not compatible with each other, so PHP has special code to adapt either of them into a single set of functions. Consequently, some of these functions are present when using DB-Library and not when using Client-Library. Also, it is possible to compile PHP for Windows using an MSSQL library. This library is really just the DB-Library, but thePHP extension creates only mssql_ functions. It also contains three functions unavailable in the Sybase extension: mssql_field_length, mssql_field_name, and mssql_field_type.
integer sybase_affected_rows(integer link)
Use sybase_affected_rows to get the number of rows affected by the last delete, insert, or update statement on a given connection. If the optional link argument is left out, the most recently opened connection will be used. Note that this function is not useful for determining the number of rows returned by a select statement. Also, this function is available only when using Client-Library.
boolean sybase_close(integer link)
The sybase_close function closes a connection to a database. Its use is not strictly necessary, since PHP will close connections for you when your script ends. You can leave out the link argument, and the last onnection to be opened will be closed.
integer sybase_connect(string server, string user, string password)
The sybase_connect function returns a connection identifier based on the server, user and password arguments. The server must be a valid server name as defined in the interfaces file. All the arguments are optional, and if left out, PHP will use sensible defaults. Connections created with sybase_connect will be closed automatically when your script completes. Compare this function with sybase_pconnect.
boolean sybase_data_seek(integer result, integer row)
The sybase_data_seek function moves the internal row pointer for a result to the specified row. Rows are numbered starting with zero. Use this function with sybase_fetch_array, sybase_fetch_object or sybase_fetch_ row to move
arbitrarily among the result set.
array sybase_fetch_array(integer result)
The sybase_fetch_array function returns an array that contains the values of all the fields for the next row. Each call to sybase_fetch_array gets the next row in the result set, or returns FALSE if no rows remain. Each field is returned in two elements. One is indexed by the field number, starting with zero. The other is indexed by the name of the field. Compare this function to sybase_fetch_object and sybase_fetch_row.
object sybase_fetch_field(integer result, integer field)
The sybase_fetch_field function returns an object that describes a field in the result set. The field argument is optional. If left out, the next field is returned. See sybase_result for an example of use.
object sybase_fetch_object(integer result)
The sybase_fetch_object function returns an object with a property for each of the fields in the next row. Each call to sybase_fetch_object gets the next row in the result set, or returns FALSE if no rows remain. Compare this function to sybase_fetch_array and sybase_fetch_row.
array sybase_fetch_row(integer result)
The sybase_fetch_row function returns an array of all the field values for the next row. The fields are indexed by integers starting with zero. Each call to sybase_fetch_row gets the next row in the result set, or returns FALSE if no rows remain. Compare this function to sybase_fetch_array and sybase_fetch_object.
boolean sybase_field_seek(integer result, integer field)
The sybase_field_seek function moves the internal field pointer to the specified field. Fields are numbered starting with zero. If you leave out the field argument, the internal pointer will be moved to the next field. his is the same internal pointer used by
boolean sybase_free_result(integer result)
The sybase_free_result function frees memory associated with a result set. It is not strictly necessary to call this function. All memory is freed when a script finishes executing.
The sybase_get_last_message function returns the last message from the Sybase database. This function is not available if you're using Client-Library instead of DBLibrary.
This function is available only when using Client-Library. It sets the minimum severity for messages sent from the client interface to be turned into PHP error messages.
Use sybase_min_error_severity to set the minimum severity level for errors to be turned into PHP error messages. This function is available only when using DB-Library.
Use sybase_min_message_severity to set the minimum severity level for messages to be turned into PHP error messages. This function is available only when using DBLibrary.
This function is available only when using Client-Library. It sets the minimum level for messages from the server interface to cause PHP error messages to be generated.
integer sybase_num_fields(integer result)
The sybase_num_fields function returns the number fields in the given result set. See sybase_result for an example of use.
integer sybase_num_rows(integer result)
The sybase_num_rows function returns the number of rows in a result set. See sybase_result for an example of use.
integer sybase_pconnect(string server, string username, string password)
The sybase_pconnect function is identical to sybase_connect, except that connections created with this function persist after the script ends. The connection lasts as long as the server process does, so if the process executes another PHP script, the connection will be reused. Connections created with sybase_pconnect should not be closed with sybase_close.
nteger sybase_query(string query, integer connection)
The sybase_query function executes a query on the given connection and returns a result identifier. This is used by many of the other functions in this section. If the connection argument is left out, the last opened connection is used.
string sybase_result(integer result, integer row, string field)
The sybase_result function returns the value of a particular field, identified by row and field. The field argument may be an integer or the name of a field. Fields and rows are numbered starting with zero. If performance is an issue, considering using sybase_fetch_row, which is much faster.
boolean sybase_select_db(string database, integer connection)
The sybase_select_db function selects the database to use on the database server. If the connection argument is omitted, the last connection created will be used. See sybase_fetch_array for an example.
PHP Related Interview Questions
|PHP Interview Questions||MySQL Interview Questions|
|PHP+MySQL Interview Questions||Drupal Interview Questions|
|MYSQL DBA Interview Questions||PHP5 Interview Questions|
|WordPress Interview Questions||Joomla Interview Questions|
|CakePHP Interview Questions||CodeIgniter Interview Questions|
|PHP7 Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.