Published on 2006-06-04 07:55:12

The current ADODB Objects Generator is using a MySQL database as its backend, but I'm using the generated code with an oracle database. You can easily configure it to work with others databases, but it's not tested yet. The generated objects have almost the same structure using set and get methods for different fields, then four main methods, load, save, update and populate which respectively read data from a table, save data to a table, update fields, and populate objects with one entry from the table.

For example, to list the current active users :

Objects require ADODB, and there is also a patch system implemented because usually during the development you'll need to add some specific methods to your object. Using patches, you can add a specific method to each generated object. For example, if your table name is a reserved word in PHP, you can change it with the patch from the download link.

To add a new method to any Object simply use the global variable $patch inside your patch file, then enter your method as a string.

Complete documentation is not yet available, but it's not really that difficult to use. First download the Objects Generator, configure it, then run the index.php. Objects will be generated in the object folder. If you need any help about using the script please use our PHP Oracle Magazine Forum

Download ADODB Objects Generator 1.0.0

Previous Page


Related Entries

Member of the PHP Magazine Network, Copyright (C) 2005-2008 phpmagazine.net All Rights Reserved