Results 1 to 1 of 1

Thread: Malformed SQL query in listview.

  1. #1
    pdh88x is offline Junior Member
    Join Date
    May 2010
    Posts
    2

    Default Malformed SQL query in listview.

    Hey there,

    Recently purchased Sugar Pro (I understand this is the community forums), however I just noticed something interesting in this installation & figured I'd come here for help first...

    Getting a malformed SQL query in my listview for a few modules, primarily admin > users and accounts.

    The following is the query:

    Code:
    SELECT  users.id ,  as name, users.last_name , users.first_name , users.user_name , users.department , users.phone_work , users.status , users.is_admin , users.created_by  FROM users  where users.deleted=0 ORDER BY name ASC
    The issue comes in directly after SELECT users.id; Should be as follows.

    Code:
    SELECT  users.id AS name, users.last_name , users.first_name , users.user_name , users.department , users.phone_work , users.status , users.is_admin , users.created_by  FROM users  where users.deleted=0 ORDER BY name ASC
    This issue came about while moving our installation over from an older server to a newer one, direct file + DB copy.

    Don't know where to edit this query; I may be being a bit dense...I've checked under Modules/Users/Listview.php and User.php

    Any help would be very much appreciated.

    EDIT:
    Nevermind, figured it out! Was under config.php, apparently I had accidentally put in the following:

    'db_type' => 'mysqli',

    when it should have been

    'db_type' => 'mysql',

    Hopefully this can help someone else =)
    Last edited by pdh88x; 2010-05-17 at 11:31 AM. Reason: Fixed!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ListView Contacts Sql Query
    By santiago.loyola in forum Developer Help
    Replies: 1
    Last Post: 2010-05-05, 06:22 PM
  2. SQL Query in Listview.
    By DerekWait7 in forum Developer Help
    Replies: 6
    Last Post: 2009-10-16, 07:58 AM
  3. Modificare query di una listview
    By BillyKidman in forum Italiano
    Replies: 0
    Last Post: 2009-07-02, 08:02 AM
  4. Custom query on ListView
    By jasv in forum Developer Help
    Replies: 3
    Last Post: 2008-10-29, 08:13 PM
  5. Replies: 1
    Last Post: 2007-09-01, 12:10 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
  •