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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Database Error Code: Unknown column 'master_id' in 'where clause', 1054
Pages: [1]

Author Topic: Database Error Code: Unknown column 'master_id' in 'where clause', 1054  (Read 1635 times)

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Database Error Code: Unknown column 'master_id' in 'where clause', 1054
December 31, 2010, 06:20:33 am
After upgrading from 3.2 to 3.3.0 I get this error every time I try to edit a contact.  I then upgraded to 3.3.1 to see that would fix it, but no luck.   Should CiviCRM be calling contact_id from civicrm_address, instead of master_id?  Drupal is at 6.19.

Quote
Database Error Code: Unknown column 'master_id' in 'where clause', 1054
Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT count(id) FROM civicrm_address WHERE master_id = 3796 [nativecode=1054 ** Unknown column 'master_id' in 'where clause']
    [type] => DB_Error
    [user_info] => SELECT count(id) FROM civicrm_address WHERE master_id = 3796 [nativecode=1054 ** Unknown column 'master_id' 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 count(id) FROM civicrm_address WHERE master_id = 3796 [nativecode=1054 ** Unknown column 'master_id' in 'where clause']"]
)[/quote]

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: Database Error Code: Unknown column 'master_id' in 'where clause', 1054
December 31, 2010, 09:04:15 am

if i had to guess the upgrade was not successful from 3.2.0 -> 3.3.1

the master_id was introduced in 3.3.alpha1 so should be part of your sql schema

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

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: Database Error Code: Unknown column 'master_id' in 'where clause', 1054
December 31, 2010, 09:40:53 am
So is it as easy adding that column, or would the upgrade have populated it with values?

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: Database Error Code: Unknown column 'master_id' in 'where clause', 1054
December 31, 2010, 07:55:03 pm

In general this error might indicate other potential errors down the road. I would roll back the db to 3.2 and try and run the upgrade again, closely monitoring for any errors

your other alternative would be to do a detailed scheme check between your version and a clean 3.3.1 install

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Database Error Code: Unknown column 'master_id' in 'where clause', 1054

This forum was archived on 2017-11-26.