feature (add-on) MDB proposal
| From: | Laurent Laville | Date: | Sat, 05 Jul 2003 12:27:11 +0000 |
| Subject: | feature (add-on) MDB proposal | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-18022@lists.php.net to get a copy of this message | ||
I've tried to create a database from a XML schema with a simple table-prefix
applied on each table without success.
Perharps i don't find the feature on MDB package, or as i think it did not
exist yet.
Why did i ask that ? :
- probably for the next release of MDB ( 2.0 ? )
- because sometimes users ( us ) have only one Database, and we want to
group each tables of an application
to avoid conflict name with another application.
For example :
I've a Database DB1 with a table T1 used by application A1, and i've another
application A2 which used also a
table called T1 (but with another structure).
So i would have in my DB1 two tables : P1_T1 and P2_T1
with P1_ the table prefix for application A1, and P2_ the table prefix for
application A2.
Now my proposal : a patch to MDB/Parser.php
Take care that i've not tested all situations, but it seems to work fine on
my examples.
Have a look on sources here :
http://farell.free.fr/en/pear/docs/mdb/show.php
And live demo for static table-prefix :
http://farell.free.fr/en/pear/docs/mdb/parser_manager.php
And live demo for variable table-prefix :
http://farell.free.fr/en/pear/docs/mdb/parser_manager.php?schema=users15.xml
Is it possible to have a new patch for MDB soon with a such need ?
Comments ?
Feeback are welcome !
Laurent Laville