|
From: Alex B. <en...@tu...> - 2001-08-20 19:47:53
|
> I had to do a quick hack to the metabase_mysql driver to support > _ProcessResult properly (added GetColumnNames($result), to driver). > We have to modifiy the other metabase drivers (mSQL,PostgreSQL) too or the > QueryManager (as I did in _GetNumCols). But I don't like abstraction there, > it's cleaner to have a standard metabase installtion that supports the > following functions for fetching column names and count for a executed query > (or something similar): > > MetabaseGetNumCols($database, $result) > MetabaseGetColNames($database, $result) > > This should be no problem. All DBMS as well as PHP support the functionality > to archive this - it just has to be done. However for the moment it works > for OCI and mysql (with the patch). Ok, cool. I think manuel is now subscribed to the list... manuel, what do you think? > Init: > ------- > I had to extent Init to load metabase and QueryManager (hope we did not > redundant work, alex?). For a example how to use the swichtches/options see: > > r2/binarycloud/user/htdocs/query_example.php > > I also prepared Init to use the request class but that's still commented > out. We didn't do redundant work. I was going to add it but didn't - you did :) > Modules: > ---------- > I did a really quick demonstration module for a simple custom query. You can > find that in r2/binarycloud/user/mod/query_example. Very cool. > How to setup??: > ------------------ > Now most important the steps to make the query example working. > > 1: Create a database named "test" (or whatever you like) > 2: Install the schema (it requires the db named test) > r2/binarycloud/user/mod/query_example/schema.xml > or install the sql dumpfile located > r2/binarycloud/user/mod/query_example/schema.xml > > Now you should have a database called "test" a tables called "news". > > 3: Modify r2/binarycloud/user/conf/datasources.php > The first source name is 'query_example'. Change the parameters > to fit your setup. > > 4: run make > 5: call query_example.php in your broswer > 6: hopefully, smile :) Will do... _a |