Announcement

Collapse
No announcement yet.

Strange behaviouw when using onBeforeUpdate

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

  • Strange behaviouw when using onBeforeUpdate

    I try to use this event to manipulate a field before it is written to the database. When doing so I got the error:
    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '00, archive = 1, order_date = '20-15-0603', total_amount = 26.599,00, `date-crea' at line 1
    When you look in the mysql statement it appears as if the data has been shifted. Dates come in the form of

    20-15-0603 etc.

    The command I do is

    if ( {status_id} == 1 && {payed} >= 0.20 * {total_amount}){
    {status_id} = 2;
    }
    The status Id should be updated id a certain amount is payed

  • #2
    Hello,

    Try to enable debug mode and give an echo in the field to check the returned value.
    Last edited by John L. Santos; 05-19-2016, 06:02 PM.
    Best Regards,
    John L. Santos

    Bug Tracker Team
    NetMake - IT Solutions

    Comment


    • #3
      Date looks not correct builded. Are you using the right values, and/or using regional settings?
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment

      Working...
      X