Results 1 to 6 of 6

Thread: count database problem

  1. #1
    andreasbalzer is offline Senior Member
    Join Date
    Aug 2008
    Posts
    36

    Question count database problem

    Hi,
    I have a big problem with my sugarcrm installation at the moment.

    I have added a drop down to the company/account module and I get the following error message. However I don't know whether it is related to the new field. Can you please help me to solve this?

    Error running count query for Account List: Query Failed SELECT count(*) c FROM meetings AND contacts.deleted=0 LEFT JOIN users jt1 ON jt1.id= meetings.assigned_user_id AND jt1.deleted=0 AND jt1.deleted=0 where ( meetings.parent_id= 'a1d3d600-9029-a5d9-c36e-48623905193f' AND meetings.parent_type='Accounts' AND meetings.deleted=0 AND (meetings.status='Planned')) AND meetings.deleted=0 ) UNION ALL ( SELECT count(*) c FROM tasks LEFT JOIN contacts contacts ON contacts.id= tasks.contact_id AND contacts.deleted=0 AND contacts.deleted=0 LEFT JOIN users jt1 ON jt1.id= tasks.assigned_user_id AND jt1.deleted=0 AND jt1.deleted=0 where ( tasks.parent_id= 'a1d3d600-9029-a5d9-c36e-48623905193f' AND tasks.parent_type='Accounts' AND tasks.deleted=0 AND (tasks.status='Not Started' OR tasks.status='In Progress' OR tasks.status='Pending Input')) AND tasks.deleted=0 ) UNION ALL ( SELECT count(*) c FROM calls AND contacts.deleted=0 LEFT JOIN users jt1 ON jt1.id= calls.assigned_user_id AND jt1.deleted=0 AND jt1.deleted=0 where ( calls.parent_id= 'a1d3d600-9029-a5d9-c36e-48623905193f' AND calls.parent_type='Accounts' AND calls.deleted=0 AND (calls.status='Planned')) AND calls.deleted=0 )::MySQL error 1064:

    Greetings,
    Andreas

  2. #2
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default Re: count database problem

    Have you tryed to repair DB?

  3. #3
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: count database problem

    Hi Andreas.

    Did you make any customization or code modification in you installation?
    Which version and flavor are you using?

    Additional details are always welcome.

    Best regards.
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  4. #4
    andreasbalzer is offline Senior Member
    Join Date
    Aug 2008
    Posts
    36

    Default Re: count database problem

    I used 5.0.0f but upgraded to 5.0.0g where the same (and several more) error occurs. With both versions a repair didn't help. I also have an own field for the accounts module called sportstype. It is a dropdown menu. I might be that the error started to appear when I created it. How to check?

  5. #5
    andreasbalzer is offline Senior Member
    Join Date
    Aug 2008
    Posts
    36

    Default Re: count database problem

    I removed the field again, but the error is still there. What to do?

    The error appears also if I select an account in the account module. It always appears at the bottom of the page.
    Last edited by andreasbalzer; 2008-08-16 at 12:19 PM.

  6. #6
    nirmit is offline Senior Member
    Join Date
    Aug 2008
    Posts
    42

    Default Re: count database problem

    Hey Andreas,

    the problem is that the query for meetings is trying to implement a condition on the contacts table. Can you check your vardefs.php for Accounts?

    Code:
    SELECT count( * ) c
    FROM meetings
    AND contacts.deleted =0 // This line should not be there.
    LEFT JOIN users jt1 ON jt1.id = meetings.assigned_user_id
    AND jt1.deleted =0
    AND jt1.deleted =0
    WHERE (
    meetings.parent_id = 'a1d3d600-9029-a5d9-c36e-48623905193f'
    AND meetings.parent_type = 'Accounts'
    AND meetings.deleted =0
    AND (
    meetings.status = 'Planned'
    )
    )
    AND meetings.deleted =0
    -------------------------------------------------------
    Nirmit Bothra
    http://twitter.com/nirmit

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Please Explain Why The Same Problem Is Being Ignored By Sugar
    By lukebream in forum Installation and Upgrade Help
    Replies: 6
    Last Post: 2008-04-06, 09:54 PM
  2. IMAP and CURL not found
    By khinester in forum Help
    Replies: 10
    Last Post: 2006-10-31, 06:24 AM
  3. Problem Installing 3.05 Database
    By bigsurf in forum Help
    Replies: 6
    Last Post: 2005-08-16, 05:21 PM
  4. Install problem - mySQL Database Not Available?
    By TimF in forum General Discussion
    Replies: 2
    Last Post: 2005-05-23, 10:39 AM
  5. Problem with contacts in the database.
    By nicolas in forum Help
    Replies: 1
    Last Post: 2005-05-17, 02:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •