OK, I'm in the process of learning AJAX from a book called "Ajax in Action" and it's really big on making applications as simple and flexible as humanly possible. It mentions something cool called "Pear DB_DataObject", an Object-Relational Mapping (ORM) tool which supposedly eliminates the need for messy SQL syntaxes by using objects (classes). You can extend it to your classes and it (from what I'm guessing), builds queries based on variables you set in a class. So like:
OK, so my questions are:PHP Code:
class Item extends DB_DataObject
/* ...and so on. */
- First, am I right about how this all works? I hope so, because it seems incredibly useful. The book I have doesn't explain it past mentioning it's usefulness (can't blame it, after all it's a book on AJAX, not PHP).
- It seems to use blank functions like find() as the "search", fetch() as the "mysql_fetch_array()", and clone() (which I have no idea).. Is there something that shows a list of the DB_DataObject functions and how to use them, or someone who knows? I tried looking on the Pear site and the downloaded scripts themselves, but couldn't find anything.
This and any information people maybe willing to offer about this DB_DataObject tool would be greatly appreciated. Thanks.