Database API

By shane
2012-10-04 23:22
6 comments
Daily Dose of Drupal Episode #22

Continued from the last episode of the Daily Dose of Drupal, this episode continues Drupal 7 module development work with the Database API to pull data from the database and display it on a page.

In this episode you will learn:

  • How to pull data from the Drupal database using the Drupal 7 db_query function
  • How to use db_select and the Database API's dynamic query building to pull data from the database
  • How to display data using a theme function to output data as a table
Daily Dose of Drupal Episode #21

This episode works off the the previous episode to create a custom Drupal 7 form using the Drupal Form API, and then looks at how to submit data from the Drupal form into a Drupal database table.

In this episode you will learn:

  • How to use hook_menu, hook_permission, and drupal_get_form to create a custom Drupal form page
  • How to create a custom Drupal 7 form using the Drupal Form API
  • How to add a validation function to the Drupal 7 form
  • How to add a submit function the Drupal 7 form
By shane
2012-10-02 13:10
4 comments
Daily Dose of Drupal Episode #20

In this example we create a new Drupal 7 module with the purpose of creating a database table inside our Drupal 7 module. We look at hook_schema and the Drupal Schema API to create a new database table.

In this episode you will learn:

  • How to create a Drupal 7 module with an .install file
  • What hook_install, hook_uninstall, and other various installation hooks do inside your .install file
  • How to implement hook_schema in your Drupal 7 module
  • How to use the Schema API for create Drupal database tables
Subscribe to Database API