|
From: Andreas A. <a.a...@th...> - 2001-08-17 22:41:34
|
Hi,
> I can say that I would prefer that datasources not be a global variable -
> because they will contain passwords, sids, etc.
Agreed. We dont have to mess up global namespace with this sensitive stuff.
Does Init have to be extended? I thought of anohter setting
<database>datasources_hook</database>
to switch on/off database support. Excatly: to import the metabase stuff and
set up querymanager with the database config stored in datasources.
> If you look at user/conf/langs.php - you'll see that it sets a cariable in
> the lang class: I'd like to have it happen the same way with QueryManager.
No problem. Ok I'll have to change that. So QueryManager will become a
global like $Lang and not a aggregated-as-needed class.
> Andreas: we might be using a slightly old version of metabase... let me
> check phpclasses and get back to you :)
Hmm, I checked the current version at phpclasses.
We need this method in the drivers (e.g. for mysql):
Function GetColumnNames($result)
{
$result_value=intval($result);
if(!IsSet($this->columns[$result_value]))
{
$this->columns[$result_value]=array();
$columns=mysql_num_fields($result);
for($column=0;$column<$columns;$column++)
$this->columns[$result_value][mysql_field_name($result,$column)]=$column;
}
}
But It's missing in mSql and MySql drivers.
Andi
|