database

Fix for my module is showing bug .. not sure why ..

  1.        
  2. By fkaufusi
  3.  
  4. Drupal version 6:
  5.  
  6. function user_access($string, $account = NULL, $reset = FALSE) {
  7.   global $user;
  8.   static $perm = array();
  9.   if ($reset) {
  10.     $perm = array();
  11.   }
  12.  
  13.   i

Shell script for taking a copy of a remote database to your local machine.

  1. if [ $1 = "--help" ];
  2.   then
  3.     echo "
  4.   #########
  5.   # USAGE #
  6.   #########
  7.  
  8.   Syntax for running this script is:
  9.     ./devdb2localdb.sh sshuser sshdomain remotedatabaseuser databasename

Fix for settings.php database array for sharing profiles

  1. <?php
  2. //usual local settings:
  3. $db_url = 'mysqli://username:password@localhost/my_drupal_db';
  4.  
  5. $db_prefix = array(
  6.     'default'                   => '',
  7.     'profile_fields'    => 'site1_',

settings.php database array for sharing profiles

  1. <?php
  2. //usual local settings:
  3. $db_url = 'mysqli://username:password@localhost/my_drupal_db';
  4.  
  5. $db_prefix = array(
  6.     'profile_fields'    => 'site1_',
  7.     'profile_values'    => 'site1_',
  8. );
  9. ?>

database helper function for keyed array

  1. /**
  2.  * Database helper function: fetch the entire result set as a keyed array.
  3.  * The first field in the result becomes the keys.

Ignore Slave Server Patch

  1. /**
  2.  * Implementation of hook_comment_insert().
  3.  */
  4. function comment_comment_insert($comment) {
  5.   drupal_set_ignore_slave();
  6. }
  7.  
  8. /*
  9.  * Implementation of hook_comment_update().
  10.  */

database benchmarks

  1. Settings:
  2. block cache: disabled
  3. optimize CSS: enabled
  4. optimize JS: enabled
  5. front page with one node.
  6.  
  7. HEAD:
  8. ====
  9. Page cache: disabled
  10. Requests per second:    9.77 [#/sec] (mean)

New DatabaseCondition

  1. class DatabaseCondition implements QueryConditionInterface, Countable {
  2.  
  3.   protected $conditions = array();
  4.   protected $arguments = array();
  5.  
  6.   protected $updated = TRUE;

Fix for my module is showing bug .. not sure why ..

  1. <?php # vim: set filetype=php expandtab tabstop=2 shiftwidth=2 autoindent smartindent:
  2.  
  3. /* TODO: add user billing address. User card information or other things may be .. */

Fix for my module is showing bug .. not sure why ..

  1. /*
  2.  
  3.  
  4.  
  5.     * warning: array_fill() [function.array-fill]: Number of elements must be positive in /c/projects/click_to_call/trunk/control_interface/includes/database.inc on line 235.
Syndicate content