dbtng_example.module

Version 1.6 (checked in on 2010/10/14 at 20:26:00 by rfay)

This is an example outlining how a module can make use of the new DBTNG database API in Drupal 7.

@todo Demonstrate transaction usage.

General documentation is available at Database abstraction layer documentation @endlink and at @link http://drupal.org/node/310069.

Functions & methods

NameDescription
dbtng_example_advanced_listRender a filtered list of entries in the database.
dbtng_example_entry_deleteDelete an entry from the database.
dbtng_example_entry_insertSave an entry in the database.
dbtng_example_entry_loadRead from the database using a filter array.
dbtng_example_entry_updateUpdate an entry in the database.
dbtng_example_form_addPrepare a simple form to add an entry, with all the interesting fields.
dbtng_example_form_add_submitSubmit handler for 'add entry' form.
dbtng_example_form_updateSample UI to update a record.
dbtng_example_form_update_callbackAJAX callback handler for the pid select.
dbtng_example_form_update_submitSubmit handler for 'update entry' form.
dbtng_example_helpImplements hook_help().
dbtng_example_listRender a list of entries in the database.
dbtng_example_menuImplements hook_menu().