User login

database

Browsing the Drupal database

Moshe on browsing the database at the Boston

He uses the Mac program SequelPro (completely free and open source). http://www.sequelpro.com/

PHPmyadmin: http://www.phpmyadmin.net

Find $db_url in settings.php

username, password, host, and database name.

Can put this data into Sequel Pro.

Bottom line: as long as you have a backup, do not be afraid to fiddle with your database!

Export and re-import a database with Drush and the command line

These are run from the project's web root, example/web, so that drush can run, but the database itself is stored outside the web root, example/db.

On the export side:

drush sql-dump > ../db/development.sql

On the import side:

`drush sql-connect` < ../db/development.sql

expands to:

mysql -hlocalhost -uexample -pyMsx2rIP drupal-example < ../db/development.sql

Fastest way to get just one result from a database table in Drupal

To get a single value result – one row from a just one column – the Drupal function for that is db_result(), which takes the result of db_query() as an argument.

http://api.drupal.org/api/function/db_result/5

(The same function works for Drupals 4.7 and 6.)

Save configuration settings to a file instead of database: brainstorm

As a module developer who loves to make configuration options, I feel guilty every time I make one more variable_get() that's going to make yet another call to the database.

Proposed solution: every module we make (say, performance_enhancer.module) can have a configuration file (performance_enhancer.config) in it.

If that configuration file is copied to files/config (in wherever your files directory is located), that copy is used instead. (file_exists seems pretty fast.)

Does this make any sense to people?

Drupal Test to Live

2006 July 10: Drupal: Enterprise Edition | Nick Lewis: The Blog

Nick Lewis on needs for moving data from test to live, with Bér, MerlinOfChaos, others weighing in.

Syndicate content