Public Member Functions | |
| __construct ($datasource) | |
| Constructor. | |
| objDbConnection () | |
| Connect to database server. | |
| objDbClose () | |
| Close connection to database server. | |
| objServerVersion () | |
| Return info on database server. | |
Definition at line 15 of file mssqlConnection.php.
| __construct | ( | $ | datasource | ) |
Constructor.
| array | $datasource | |
| bool | $persistent |
Definition at line 48 of file mssqlConnection.php.
{
$this->objDatasource = $datasource;
$this->objDatasource[5] = ( array_key_exists( 5, $datasource ) && $datasource[5] ) ? true : false;
}
| objDbClose | ( | ) |
Close connection to database server.
public
Definition at line 78 of file mssqlConnection.php.
{
return mssql_close( $this->objConnection );
}
| objDbConnection | ( | ) |
Connect to database server.
Definition at line 59 of file mssqlConnection.php.
{
$this->objConnection = ( $this->objDatasource[5] ) ? mssql_pconnect( $this->objDatasource[1], $this->objDatasource[2], $this->objDatasource[3] )
: mssql_connect( $this->objDatasource[1], $this->objDatasource[2], $this->objDatasource[3] );
if ( $this->objConnection )
mssql_select_db( $this->objDatasource[4], $this->objConnection );
else
trigger_error( mssql_get_last_message(), E_USER_WARNING );
return $this->objConnection;
}
| objServerVersion | ( | ) |
Return info on database server.
public
Definition at line 89 of file mssqlConnection.php.
{
$objStmt = mssql_query( 'SELECT @@VERSION' );
$objResult = mssql_fetch_row( $objStmt );
mssql_free_result( $objStmt );
return $objResult[0];
}
1.7.1