CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Accessing Database Objects
Pages: [1]

Author Topic: Accessing Database Objects  (Read 1141 times)

jdowd

  • I’m new here
  • *
  • Posts: 17
  • Karma: -5
Accessing Database Objects
May 05, 2008, 12:29:58 pm
Hi, 

I am hoping that someone can provide an example of how I can access civicrm data from a php snippet from within a drupal php node.  essentially, I want to be able to pull contact name, email and employer from the civicrm side and display it to authenticated drupal users.  I have the query, I just do not know which civierm modules to call into the script to access the civi db.  I am using version 1.9.

Any help is greatly appreciated.

Thanks,

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Accessing Database Objects
May 06, 2008, 12:20:52 am

You might want to check some drupal modules which do this. a few examples are:

http://drupal.org/project/civicrm_eventblock
http://drupal.org/project/civimember_roles

those should give you a few good examples of how to integrated civicrm and drupal

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Accessing Database Objects
May 06, 2008, 12:23:52 am
Also check : http://wiki.civicrm.org/confluence/display/CRMDOC/Using+CiviCRM+APIs+-+Code+Snippets

kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Accessing Database Objects

This forum was archived on 2017-11-26.