Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-3603

Add the possibility to use a named placeholder multiple times in a query

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • P3: Somewhat important
    • 5.0.0
    • None
    • SQL Support
    • None

    Description

      Currently, in a QSqlQuery, a named placeholder cannot be used multiple times.

      An query like this is invalid:
      QSqlQuery query;
      query.prepare("SELECT x, y FROM z WHERE :price > 10 AND :price < 1000");
      query.bindValue(":price", someVariable);

      It would be useful to be able to use the same placeholder every time the value is needed.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mabrand Mark Brand
            poulain Benjamin Poulain (closed Nokia identity) (Inactive)
            Votes:
            13 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes