Results 1 to 3 of 3

Thread: sort mysql table

  1. #1
    Join Date
    Nov 2006
    Posts
    96

    Default sort mysql table

    Hi, I want to sort mysql table alphabetically (without case sensitivity).

    I have a bunch of names in it and I want to have a method in QT program, that would change mysql table (names woule be sorted alphabetically)

    So any idea how to do that?

  2. #2
    Join Date
    Nov 2006
    Posts
    96

    Default Re: sort mysql table

    I solved it like this:

    Qt Code:
    1. QSqlQuery query("SELECT ime,postna_st FROM kraj ORDER BY ime");
    To copy to clipboard, switch view to plain text mode 

    works like a charm...for now

  3. #3
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: sort mysql table

    Hi,

    You have selected data in a sorted manner, but the table will not change.
    I want to have a method in QT program, that would change mysql table
    But if this works fine, better for you. : )

    Good luck!
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

Similar Threads

  1. get mysql table into QComboBox
    By eleanor in forum Qt Programming
    Replies: 17
    Last Post: 10th October 2007, 15:35
  2. MYSQL 5 Table qt model as small Mysql admin
    By patrik08 in forum Qt-based Software
    Replies: 0
    Last Post: 1st May 2007, 09:43
  3. MySQL starting problem
    By shamik in forum General Discussion
    Replies: 5
    Last Post: 25th April 2007, 07:20
  4. displaying any table on a qdatatable
    By Philip_Anselmo in forum Newbie
    Replies: 4
    Last Post: 9th May 2006, 22:12
  5. creating table plugin
    By mgurbuz in forum Qt Programming
    Replies: 3
    Last Post: 28th April 2006, 13:50

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
  •  
Qt is a trademark of The Qt Company.