Skip to main content

Views3 Integration ( Add Db_prefix in settings.php for drupal 7 )


These instructions assume CiviCRM and Drupal are on separate databases located on the same physical host, and that the same database user has access to both the CiviCRM and Drupal databases.
  1. Before making any changes, it is strongly advised that you make backups of your mysql databases and settings.php file.
  2. Make sure you are logged into your Drupal site as the administrator.
  3. Visit http://yourdomain.com/civicrm/admin/setting/uf?reset=1 Replace with the domain of your Drupal site/installation.
  4. You should see a page with output that begins with: "$databases['default']['default']['prefix']= array("
  5. Copy everything inside this box, including the trailing ");"
  6. Open /sites/default/settings.php for editing from the root directory of the site, typically "public_html" on most servers. (NOTE: This assumes you have a single site installation. The location of the settings file might be different depending on whether or not you have multiple sites)
  7. Find the database connector array. This is where Drupal stores the information regarding the MySQL database and the necessary credentials to connect to it. The array beings with " $databases = array ( " then goes on to include the location and MySQL credentials, as well as additional options.
  8. Paste the output from step 3 here. Be sure to paste it AFTER the trailing ");"
  9. Save the file. You might want to clear your site cache at this point. 
  10. You should now be able to create views based on CiviCRM data.
If It is not possible to complete, Still gives error then Add one line to $db_prefix array :

 $databases['default']['default']['prefix'] = array(
'default'   => 'default_',

For More Information Click Here .

Above steps is working for Drupal 7.

To do db_prefix in Drupal 6 : No need to add extra line.

Add The code which on the link below:

Your Drupal Site base path /civicrm/admin/setting/uf?reset=1

Comments

Popular posts from this blog

Create Hooks in Civicrm in Joomla 1.5

  Create Hooks in Civicrm in Joomla 1.5 Create folder in any directory like /Joomla/media/civicrm_hook . Create file civicrmHooks.php in this directory. Go to Administer CiviCRM > Global Settings > Directories Set the path for custom php here. Use the civicrm hooks with Joomla_civicrm_hookName format. Ex. function Joomla_civicrm_buildForm( ){ // Write your code here. }

New Services to the world

Different government services & Online Services GST Registration Company Registration ITR PAN Card Aadhar Card E-way Bill Registration Food License Accounting Service Website designing Website development Website Hosting Website Domain Website Testing (Manual) Website SCO Optimization Lead Generation Add Creation and many more...

Some of the good sentences that one should keep in mind.

Don’t compare yourself with anyone in this world. If you do so, you are insulting yourself.  You are not responsible for what people think about you . But you are responsible for what you give them to think about you. A man is lucky if he is the first love of a woman. A woman is lucky if she is the last love of a man. Write your Sad times in Sand, Write your Good times in Stone. Behind every successful man, there is an untold pain in his heart. Without your involvement you can't succeed. With your involvement you can't fail. Love your job but don't love your Company because you may not know when your company stops loving you. You may get DELAYED to reach your Targets. But every step you take towards your target is EQUAL to Victory. It's better to loose your Ego to the one you Love, than to loose the one you LOVE because of EGO. Don't make promise when you are in JOY . Don't reply when you are SAD. Don't take decisions when you are ANGRY. Think twice, Act w...