Working with Views in Drupal 7 and earlier

The documentation for Views 2 and Views 3 for Drupal 6 and Drupal 7 is contained within Views module! Install the Advanced Help module to access it.

Advanced help for viewsScreenshot example showing Advanced Help when clicking on the "?".

Which Branch: Views 1, Views 2 or Views 3?
Views 1.x is for Drupal 5 (and earlier). Views 2.x and 3.x are for Drupal 6. Views 3.x is for Drupal 7.

Drush SQL Query (sql-query, sqlq)

Below you find some examples of howto use the Drush sql-query (alias : sqlq) command.

Show information of user 1:
drush sql-query "SELECT * FROM users where uid=1"

Troubleshooting

error: system() has been disabled for security reasons

To resolve, go to your (local or global) php.ini and temporarily remove 'system' from the disable functions parameter:

Example:

Change
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, shell, symlink
To:
disable_functions = show_source, shell_exec, passthru, exec, phpinfo, shell, symlink

Warning: this exposes some security risks, so there must be a better way to do it with PHP, without using the 'system()' function.

Using a custom php.ini
Please see the page Modifying the PHP or PHP configuration that drush runs under for instructions on creating a custom php.ini file for Drush.

Custom version of the php.ini file

You can use something like this to invoke a custom version of the php.ini file you want to use with Drush. The PHP command argument -c ini-file will allow you to specify a custom .ini file to use with Drush.

Working with Views

Using the Views module, you can fetch content from the database and present it to the user as lists, posts, galleries, tables, maps, graphs, menu items, blocks, reports, forum posts etc. It provides a graphical interface to a SQL query builder that can access virtually any information in your database and display it in any format. You can also use Views to present related content. For example, you can display a list of users along with links to the content they have created.

Subscribe with RSS Subscribe to RSS - SQL queries