By: Mankiy
Date: 2003-07-20
Time: 03:34
|
ADOdb
is it basically the same as using another db with TBS?
ex:
$PAGE->MergeBlock("Main", "ADOdb", "SELECT * FROM some_table");
|
I want my app. to be able to use multiple databases...
|
By: Skrol29
Date: 2003-07-20
Time: 04:23
|
Re: ADOdb
Yes and no.
TBS supports in native the Microsoft ADODB.
But your are probably talking about the John Lim's ADOdb.
TinyButStrong can support the John Lim's ADOdb if you use custom functions.
Here is the custom functions for John Lim's ADOdb.
$conn must the the name of the variables you use for the connection.
The MergeBlock() you wrote is ok.
function tbsdb_adodb_open(&$source,&$query) {
global $conn ;
$rs = $conn->Execute($query) ;
return $rs ;
}
function tbsdb_adodb_fetch(&$rs) {
return $rs->FetchRow() ;
}
function tbsdb_adodb_close(&$rs) {
$rs->Close() ;
}
|
|
By: Mankiy
Date: 2003-07-20
Time: 04:31
|
Re: ADOdb
would I put that into the TBS class file?
and if not, where would i put it, and how would i use it to connect that way?
sorry about this, but im strictly mysql, this is for when my app comes out
|
By: Skrol29
Date: 2003-07-20
Time: 04:43
|
Re: ADOdb
No, don't put those functions in the TBS file.
It would cause problem for an upgrade to the next TBS version.
Just add the functions in your application. In the same file as the $conn variable is set.
|
|
Posting in progress.
Please wait...
|