如果我使用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。那Sybase怎么样?什么应该放在主机名?还有dbdriver?是ODBC吗?
感谢。
答案 0 :(得分: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端口
或 HOST = 127.0.0.1
$db['default']['username'] = "";
$db['default']['password'] = "";
$db['default']['database'] = "";
$db['default']['dbdriver'] = "odbc";