1

如果我使用 ODBC 连接到 Sybase,我应该在 database.php 文件中使用什么设置?

$db['default']['hostname'] = "";
$db['default']['username'] = "root";
$db['default']['password'] = "";
$db['default']['database'] = "database_name";
$db['default']['dbdriver'] = "";

我知道 mysql 的主机名是 localhost,而 dbdriver 是 mysql。赛贝斯呢?主机名应该放在什么位置?和数据库驱动程序?是 ODBC 吗?

谢谢。

4

1 回答 1

0
 $db['default']['hostname'] = "Driver=Adaptive Server Anywhere 7.0;ENG=your_server_sybase  ;UID=youruser;PWD=yourpswrd;DBN='';LINKS=TCPIP(HOST=127.0.0.1:9000) " 

HOST=127.0.0.1:9000 端口 9000

或主机=127.0.0.1


 $db['default']['username'] = "";
 $db['default']['password'] = "";
 $db['default']['database'] = "";
 $db['default']['dbdriver'] = "odbc";
于 2013-05-13T15:09:46.603 回答