Results 1 to 5 of 5

Thread: SQL commande with QT

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 284 Times in 279 Posts

    Default Re: SQL commande with QT

    1. Read more about QSqlQuery constructors.
    2. It should be like this :
    Qt Code:
    1. QSqlQuery query;
    2. query.prepare("SELECT * FROM commandes WHERE id=(:id)");
    3. query.bindValue(":id", id);
    4. query.exec();
    To copy to clipboard, switch view to plain text mode 

  2. #2

    Default Re: SQL commande with QT

    Oh ok nice, from all the website I have looked over none talked about the prepare method, I guess my searching skill is not quite proefficient yet. Anyway Thank you that was really helpfull

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.