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) »
  • Error in Search Builder using DOB
Pages: [1]

Author Topic: Error in Search Builder using DOB  (Read 1319 times)

BarisArt

  • Guest
Error in Search Builder using DOB
February 25, 2008, 05:22:18 am
I try to search users born after a specific date using the Search Builder, but I get an error:

Sorry. A non-recoverable error has occurred.
Database Error Code: Unknown column 'civicrm_contact.birth_date' in 'where clause', 1054

Code: [Select]
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name  FROM civicrm_contact contact_a WHERE  (  ( civicrm_contact.birth_date > 19900101 AND contact_a.contact_type IN ('Individual') )  )  AND  ( 1 )     [nativecode=1054 ** Unknown column 'civicrm_contact.birth_date' in 'where clause']
    [type] => DB_Error
    [user_info] => SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name  FROM civicrm_contact contact_a WHERE  (  ( civicrm_contact.birth_date > 19900101 AND contact_a.contact_type IN ('Individual') )  )  AND  ( 1 )     [nativecode=1054 ** Unknown column 'civicrm_contact.birth_date' in 'where clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name  FROM civicrm_contact contact_a WHERE  (  ( civicrm_contact.birth_date > 19900101 AND contact_a.contact_type IN ('Individual') )  )  AND  ( 1 )     [nativecode=1054 ** Unknown column 'civicrm_contact.birth_date' in 'where clause']"]
)

It looks like the WHERE 'civicrm_contact.birth_date' should be 'contact_a.birth_date'.

Can someone tell me where I can change this?[/code]

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: Error in Search Builder using DOB
February 25, 2008, 05:34:43 am
This is a bug in Search Builder. I have filed an issue for the same. http://issues.civicrm.org/jira/browse/CRM-2727

thanx,

kurund
Found this reply helpful? Support CiviCRM

BarisArt

  • Guest
Re: Error in Search Builder using DOB
February 25, 2008, 05:42:43 am
Thanks, I'll watch the issue for a fix.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Error in Search Builder using DOB

This forum was archived on 2017-11-26.