Results 1 to 2 of 2

Thread: SQL Error, Detailview Contacts

  1. #1
    simple is offline Sugar Community Member
    Join Date
    Jul 2005
    Posts
    259

    Default SQL Error, Detailview Contacts

    Hi

    1. Click on the tab "Contacts"
    2. Click on "Saved Search & Layout"
    3. Choose "Order by" Name
    3. Click on Search
    4. Click on an contact

    Error retrieving Contact list:
    Query Failed:SELECT contacts.*, accounts.name as account_name, accounts.id as account_id, accounts.assigned_user_id account_id_owner, users.user_name as assigned_user_name ,teams.name AS team_name , contacts_cstm.* FROM contacts LEFT JOIN users ON contacts.assigned_user_id=users.id LEFT JOIN accounts_contacts ON contacts.id=accounts_contacts.contact_id and accounts_contacts.deleted = 0 LEFT JOIN accounts ON accounts_contacts.account_id=accounts.id LEFT JOIN teams ON contacts.team_id=teams.id AND (teams.deleted=0) LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where contacts.deleted=0 AND (accounts.deleted is NULL or accounts.deleted=0) ORDER BY name ASC LIMIT 0,1::
    MySQL error 1052: Column 'name' in order clause is ambiguous


    MySQL 5.0.32
    PHP 5.2.0
    Apache 2.2
    Linux Debian 4.0

    (bug tracker is not reachable)
    Cheers Pascal
    Simplicity GmbH

  2. #2
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: SQL Error, Detailview Contacts

    Well, off hand, I think you'll need to edit the ListView.html and make the order by field to be unique.

    IE accounts.name instead of just name.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2008-02-22, 04:25 PM
  2. Replies: 1
    Last Post: 2005-12-19, 03:55 PM
  3. SQL delete contacts
    By bjs3 in forum General Discussion
    Replies: 4
    Last Post: 2005-07-17, 01:56 AM

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
  •