Results 1 to 2 of 2

Thread: search in sql?

  1. #1
    Join Date
    Feb 2011
    Posts
    22
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    1

    Default search in sql?

    I would like to ask your help and a few example codelines about the following:
    I receive a message from a client, i tokenize the information and i include them in qstrings. One of them is the deviceNr. I have an sql db and one of the tables has the DEVICENR column. How i can search withing this column from my qt application if the deviceNr i receive is existing to the respective column?

    Could you please give me an example?

    Thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: search in sql?

    Marry the simple SQL statement:
    Qt Code:
    1. select DEVICENR from TABLE where DEVICENR = ?
    To copy to clipboard, switch view to plain text mode 
    with the information imparted by the SQL in Qt information, the SQL Examples and the quite helpful QSqlQuery documentation.

Similar Threads

  1. Grooveshark.com like search bar
    By bittuthegr8 in forum Newbie
    Replies: 5
    Last Post: 2nd February 2011, 09:48
  2. file search
    By Benjamin in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2009, 15:33
  3. QTreeView search
    By jpujolf in forum Qt Programming
    Replies: 6
    Last Post: 3rd March 2009, 07:43
  4. Search box?
    By sdfisher in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2007, 19:37

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.