Re: Re: cvs: php4 /pear DB.php /pear/DBcommon.phpmysql.php

From: Date: Mon, 04 Dec 2000 22:20:46 +0000
Subject: Re: Re: cvs: php4 /pear DB.php /pear/DBcommon.phpmysql.php
References: 1 2 3 4 5 6  Groups: php.pear 
Request: Send a blank email to php-pear+get-522@lists.php.net to get a copy of this message
Chuck Hagenbuch wrote: > > Tell me how and I'll do it. > > For MySQl, mysql_list_tables > (http://www.php.net/manual/function.mysql-list- > tables.php) will let you check for the sequence table; if it's not > there, then run a CREATE TABLE ... query with the correct syntax. That wasn't the "how" I meant. I mean, we don't really want to check during each and every call to nextid() if the table exists, do we? So, we would need to put it into the PEAR installation stuff, which makes no sense, either, since we need that db_sequence in every database we work on. > Because this is going to be DB-specific, the nextid() function in > DB_common should probably be a stub returning a DB_NOT_SUPPORTED > error object, with implementations (and thus table syntax) stored in > the individual drivers. I was thinking about that, but need to do more of it - thinking I mean :-) > We should probably also add some meta-data functions to the API, to call > functions like mysql_list_tables (assuming that they're remotely > portable - odbc has an odbc_tables() function, so I'm guessing that > it's relatively common denominator). The several DB_Sql implementations in PHPLIB's database abstraction system for the various database systems have meta-data methods, maybe we could use them for a start. -- <? print implode( "", array_reverse( preg_split( "//", "dlrow laer " . "eht ot emoclew" ) ) ); /* visit http://www.sebastian-bergmann.de/ */ ?>

« previous php.pear (#522) next »