本文整理汇总了PHP中DBManagerFactory::isFreeTDS方法的典型用法代码示例。如果您正苦于以下问题:PHP DBManagerFactory::isFreeTDS方法的具体用法?PHP DBManagerFactory::isFreeTDS怎么用?PHP DBManagerFactory::isFreeTDS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBManagerFactory
的用法示例。
在下文中一共展示了DBManagerFactory::isFreeTDS方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_freetds
function is_freetds()
{
return DBManagerFactory::isFreeTDS();
}
示例2: valid
/**
* Check if this driver can be used
* @return bool
*/
public function valid()
{
return function_exists("mssql_connect") && DBManagerFactory::isFreeTDS();
}
示例3: testGetInstanceMssqlForceSqlsrvSelection
/**
* @ticket 27781
*/
public function testGetInstanceMssqlForceSqlsrvSelection()
{
if ($GLOBALS['db']->dbType != 'mssql' || !function_exists('sqlsrv_connect')) {
$this->markTestSkipped('Only applies to SQL Server');
}
$GLOBALS['sugar_config']['db_mssql_force_driver'] = 'sqlsrv';
$db = DBManagerFactory::getInstance();
if (DBManagerFactory::isFreeTDS() && !function_exists('sqlsrv_connect')) {
$this->assertTrue($db instanceof FreeTDSManager, "Should return a FreeTDSManager object");
} elseif (function_exists('mssql_connect') && !function_exists('sqlsrv_connect')) {
$this->assertTrue($db instanceof MssqlManager, "Should return a MssqlManager object");
} else {
$this->assertTrue($db instanceof SqlsrvManager, "Should return a SqlsrvManager object");
}
}