These functions allow you to access MS SQL Server database. 
This extension is not available anymore on Windows with PHP 5.3 or later. 
SQLSRV, an alternative extension for MS SQL connectivity is available from 
Microsoft: » http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx.
Alternatively to use the mssql functions in Windows, use php_dblib.dll (FreeTDS) http://www.freetds.org/
e.g. php.ini setting
extension=php_dblib.dll
php_dblib.dll (FreeTDS) use ':' as the delimiter in all installations.
This commit is contained in:
Roly Rudy Gutierrez Pinto
2015-06-15 12:53:25 -04:00
parent 4786272544
commit cd8c8ef9cc
3 changed files with 25 additions and 4 deletions

View File

@@ -136,10 +136,13 @@ class dbConnections
/**
* getConnectionsProUid
*
* @param string $pType
* Parameter $only list of items displayed, everything else is ignored.
*
* @param string $pProUid
* @param string $only
* @return Array $connections
*/
public function getConnectionsProUid ($pProUid)
public function getConnectionsProUid ($pProUid, $only = array())
{
$connections = Array ();
$c = new Criteria();
@@ -155,8 +158,9 @@ class dbConnections
$result->next();
$row = $result->getRow();
$sw = count($only) > 0;
while ($row = $result->getRow()) {
if ((trim( $pProUid ) == trim( $row[1] )) && ($row[2] == 'mysql')) {
if ((trim( $pProUid ) == trim( $row[1] )) && ( $sw ? in_array($row[2], $only) : true )) {
$connections[] = Array ('DBS_UID' => $row[0],'DBS_NAME' => '[' . $row[3] . '] ' . $row[2] . ': ' . $row[4]
);
}