Uploaded image for project: 'CMS CONTENIDO'
  1. CMS CONTENIDO
  2. CON-1925

Prepared statements get wrong colum values

    Details

      Description

      Assuming, a table has the columns "id" and "idclient", preparing a statement like
      SELECT * FROM :table WHERE id = ':id' AND idclient = ':idclient'
      will not work, because ":id" in ":idclient" will be replaced by the value of "id".
      Therefore, assuming "id" has the value "2", and "idclient" has the value "1", the statement gets
      SELECT * FROM :table WHERE id = '2' AND idclient = '2client'
      instead of
      SELECT * FROM :table WHERE id = '2' AND idclient = '1'

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                frederic.schneider Frederic Schneider
                Reporter:
                dominik.ziegler Dominik Ziegler
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: