Answers.Body: <p>I think this is now <a href="https://github.com/civicrm/civicrm-core/pull/14409" rel="nofollow noreferrer">fixed</a> in 5.14. You can try applying patch from <a href="https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/14409.patch" rel="nofollow noreferrer">here</a> or upgrade CiviCRM to 5.15.1.</p>
  
  <p>Thanks</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-23T22:05:46.777Z
Answers.LastActivityDate: 2019-07-23T22:05:46.777Z
Answers.UserDisplayName: Pradeep Nayak
Answers.Body: <p>The error establishing a database connection error basically means that for some reason or another the PHP code was unable to connect to your MySQL database to retrieve the information it needs to fully build that page.Here are how to solve it： <a href="https://docsbay.net/how-to-fix-error-establishing-a-database-connection-error" rel="nofollow noreferrer">https://docsbay.net/how-to-fix-error-establishing-a-database-connection-error</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-30T02:46:35.230Z
Answers.LastActivityDate: 2019-07-30T02:46:35.230Z
Answers.UserDisplayName: FloydClak
Body: <p>When running a CRM advanced search. If we try Adv Search>Display results as'Realted contacts' and choose and Rel type. The hit search we get the DB error.</p>
  
  <p>CiviCRM: 5.13.4</p>
  
Tags: <advanced-search>
Title: Fatal Error on Advance search
ThreadText: # Fatal Error on Advance search
  
  (Asked by: username_0 on 2019-07-23)
  
  When running a CRM advanced search. If we try Adv Search>Display results as'Realted contacts' and choose and Rel type. The hit search we get the DB error.
  
  CiviCRM: 5.13.4
  
  **Tags:** advanced-search
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-07-23. Score: 2
  
  I think this is now [fixed](https://github.com/civicrm/civicrm-core/pull/14409) in 5.14. You can try applying patch from [here](https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/14409.patch) or upgrade CiviCRM to 5.15.1.
  
  Thanks
  
  Pradeep
  
  
  ---
  
  ### Answer by username_2 on 2019-07-30. Score: 1
  
  The error establishing a database connection error basically means that for some reason or another the PHP code was unable to connect to your MySQL database to retrieve the information it needs to fully build that page.Here are how to solve it： <https://docsbay.net/how-to-fix-error-establishing-a-database-connection-error>
  
  
  ---
  
  