Announcement

Collapse
No announcement yet.

Globale session variable within sc_exec_sql not working

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Globale session variable within sc_exec_sql not working

    Hello,
    I found the following error in SC V7.1...2

    $command = "update xy set field = [global_variable} where id = 5";
    sc_exec_sql ($command) ; ..... this works ....

    sc_exec_sql ("update xy set field = [global_variable} where id = 5"); ..... this doesn't work because the variable [global_variable] is not recognized ...

    Seems to be a bug of compilation of the sc_exec_sql Command.

    Best regards
    Uwe Pfeiffer

  • #2
    Hi Uwe,

    Application / Global Variable / Scope => Session ticked?

    Or use $_SESSION['App']['Variable'] ...
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

    Comment


    • #3
      Hello,
      the first $command is working .. so SC is knowing the global variable....
      sc_exec_sql also should know the variable ...

      Regards
      Uwe

      Comment


      • #4
        Hello,

        Please turn on debug mode and see which SQL query SC is generating.

        Have you tried?

        ("update xy set field =". [global_variable}." where id = 5")

        regards,
        Bernhard Bernsmann

        Comment

        Working...
        X