Answers.Body: <p>I can't comment on the other answer (I don't have enough reputation), but here are some additional information suggestions:</p>
  <p><a href="https://forum.backdropcms.org/forum/backdropcms-views-and-civicrm-integration" rel="nofollow noreferrer">https://forum.backdropcms.org/forum/backdropcms-views-and-civicrm-integration</a></p>
  <p>I got it working with these two changes:</p>
  <ol>
  <li>We made this change:</li>
  </ol>
  <pre><code>OLD:    $database_prefix = array(
  NEW:    $databases['default']['default']['prefix']= array(
  </code></pre>
  <ol start="2">
  <li>We removed the backticks on all the table items we had pasted into the settings.php file:</li>
  </ol>
  <pre><code>OLD:    'civicrm_view_case_activity_recent'        =&gt; '`tcog2_civicrm`.',
  NEW:    'civicrm_view_case_activity_recent'        =&gt; 'tcog2_civicrm.',
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-19T22:45:45.863Z
Answers.Text: Can you paste the relevant bits into your answer directly?
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-19T22:58:18.947Z
Answers.Text: Added additional details. Thanks for suggestion.
Answers.UserDisplayName: Tim Erickson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-19T22:29:05.157Z
Answers.LastActivityDate: 2021-03-19T22:52:35.733Z
Answers.LastEditDate: 2021-03-19T22:52:35.733Z
Answers.UserDisplayName: Tim Erickson
Answers.Body: <p>Getting Views working with Backdrop is essentially the same as getting Views working with Drupal, although there can be one extra step. So first, <a href="https://civicrm.stackexchange.com/a/2181/26">follow these instructions to get CiviCRM's tables into Views</a>.</p>
  
  <p>Regarding the possible second step, Backdrop by default uses a simplified structure to specify database credentials (<a href="https://api.backdropcms.org/database-configuration" rel="nofollow noreferrer">more</a>). This will not cause a problem if you are using the same database for CiviCRM and Backdrop and you do not have a second step.</p>
  
  <p>If, however, you have CiviCRM in a separate database, you need to adjust your Backdrop settings.php in one additional way, changing the default/simplified database string...</p>
  
  <pre><code>$database = 'mysql://user:pass@localhost/database_name';
  </code></pre>
  
  <p>...to allow multiple databases:</p>
  
  <pre><code>$databases['default']['default'] = array(
    'driver' =&gt; 'mysql',
    'database' =&gt; 'database_name',
    'username' =&gt; 'user',
    'password' =&gt; 'pass',
    'host' =&gt; 'localhost',
  );
  </code></pre>
  
  <p>@colemanw's note from the Drupal answer applies here, too: "if your [Backdrop] sql user and CiviCRM sql user are different then you need to grant SELECT privileges to the [Backdrop] one for the CiviCRM db."</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-28T23:28:09.343Z
Answers.LastActivityDate: 2017-10-28T23:28:09.343Z
Answers.UserDisplayName: Laryn
Body: <p>I followed the instructions for getting Views working with Drupal but it's not working in Backdrop. I see:</p>
  
  <pre><code>SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_name.civicrm_contact' doesn't exist
  </code></pre>
  
Tags: <drupal-views><backdrop>
Title: How do I get Views working with CiviCRM and Backdrop?
ThreadText: # How do I get Views working with CiviCRM and Backdrop?
  
  (Asked by: username_0 on 2017-10-28)
  
  I followed the instructions for getting Views working with Drupal but it's not working in Backdrop. I see:
  
  ```
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_name.civicrm_contact' doesn't exist
  
  ```
  
  **Tags:** drupal-views, backdrop
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-10-28. Score: 4 | Accepted answer
  
  Getting Views working with Backdrop is essentially the same as getting Views working with Drupal, although there can be one extra step. So first, [follow these instructions to get CiviCRM's tables into Views](https://civicrm.stackexchange.com/a/2181/26).
  
  Regarding the possible second step, Backdrop by default uses a simplified structure to specify database credentials ([more](https://api.backdropcms.org/database-configuration)). This will not cause a problem if you are using the same database for CiviCRM and Backdrop and you do not have a second step.
  
  If, however, you have CiviCRM in a separate database, you need to adjust your Backdrop settings.php in one additional way, changing the default/simplified database string...
  
  ```
  $database = 'mysql://user:pass@localhost/database_name';
  
  ```
  
  ...to allow multiple databases:
  
  ```
  $databases['default']['default'] = array(
    'driver' => 'mysql',
    'database' => 'database_name',
    'username' => 'user',
    'password' => 'pass',
    'host' => 'localhost',
  );
  
  ```
  
  @colemanw's note from the Drupal answer applies here, too: "if your [Backdrop] sql user and CiviCRM sql user are different then you need to grant SELECT privileges to the [Backdrop] one for the CiviCRM db."
  
  
  ---
  
  ### Answer by username_1 on 2021-03-19. Score: 3
  
  I can't comment on the other answer (I don't have enough reputation), but here are some additional information suggestions:
  
  <https://forum.backdropcms.org/forum/backdropcms-views-and-civicrm-integration>
  
  I got it working with these two changes:
  
  1. We made this change:
  
  ```
  OLD:    $database_prefix = array(
  NEW:    $databases['default']['default']['prefix']= array(
  
  ```
  
  2. We removed the backticks on all the table items we had pasted into the settings.php file:
  
  ```
  OLD:    'civicrm_view_case_activity_recent'        => '`tcog2_civicrm`.',
  NEW:    'civicrm_view_case_activity_recent'        => 'tcog2_civicrm.',
  
  ```
  
  > **Comments:**
  > **username_0**: Can you paste the relevant bits into your answer directly?  
  > **username_1**: Added additional details. Thanks for suggestion.  
  
  ---
  
  