Prado学习备忘录(2)
时间:2006-05-26 来源:saillee
Prado中TAdoDB的使用
1.以Module的形式使用TAdoDB,application.xml中加入:
代码中应首先加入:
Prado::using('System.DataAccess.TAdodb');
其他代码:
$this->DBProvider = $this->Application->getModule('dblogin');
$this->DBProvider->SetFetchMode(FETCH_ASSOCIATIVE);
$this->Database = $this->DBProvider->getConnection();
$this->Database->open();
$rs = $this->Database->Execute('select * from some_table');
1.以Module的形式使用TAdoDB,application.xml中加入:
代码中应首先加入:
Prado::using('System.DataAccess.TAdodb');
其他代码:
$this->DBProvider = $this->Application->getModule('dblogin');
$this->DBProvider->SetFetchMode(FETCH_ASSOCIATIVE);
$this->Database = $this->DBProvider->getConnection();
$this->Database->open();
$rs = $this->Database->Execute('select * from some_table');
相关阅读 更多 +