Announcement

Collapse
No announcement yet.

Help with "SELECT"

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

  • Help with "SELECT"

    Hi Friends,

    Is it possible to have a function within "SELECT" clause in SQL Section of a form or a grid?

    For example, in a regular SQL statement, I have

    INSERT INTO TmpTable (T_Date, T_DocNo, T_CustNo, T_Total) SELECT B_Date, B_DocNo, B_CustNo, B_Total From BillTable WHERE ....

    I want to add a function like

    INSERT INTO TmpTable (T_Date, T_DocNo, T_CustNo, T_Total) SELECT CONVDATE(B_Date), B_DocNo, B_CustNo, B_Total From BillTable WHERE ....

    CONVDATE is a custom php method / function?

    I tried but got something like "ERROR : Undefined Propperty : <Form Name apl> : $CONVDATE"

  • #2
    You cannot use php methods within a sql statement. If you need to convert a date you need to look into the standard functions the databases provides you.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      O.K. Thanks.

      Comment

      Working...
      X