Re: [pear-webmaster] RE: Help On database additions and class mappings
| From: | Brett Bieber | Date: | Mon, 15 Sep 2008 16:29:03 +0000 |
| Subject: | Re: [pear-webmaster] RE: Help On database additions and class mappings | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-29260@lists.php.net to get a copy of this message | ||
Hi Kendell,
Please use the pear-general list for questions related to specific
PEAR packages.
On Mon, Sep 15, 2008 at 9:39 AM, Kendell Paryag
<kendell@trinidadtunes.com> wrote:
> I have added a new table to the database and will like to map it as a class
> Data Object with PEAR.
>
>
>
> How do I go about doing this so that the code is generated for the table's
> base class, like all the other Data Object mappings?
>
>
>
> Is there a way to update the Auto Building and Database schema files, to
> reflect the newly added database table?
>
The standard way of handling this is using an ini file with the
configuration details and running the createTables.php script included
with DB_DataObject. See the info in the documentation:
http://pear.php.net/manual/en/package.database.db-dataobject.intro-configuration.php
http://pear.php.net/manual/en/package.database.db-dataobject.intro-autobuilding.php
with this you run: php createTables.php dataobject.ini
and it will update all the files.
Hope that helps!
--
Brett Bieber
http://saltybeagle.com/