User login

database

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