Editor using if statement with editing

Editor using if statement with editing

KarfieldKarfield Posts: 8Questions: 2Answers: 0

Hello!

I wish to save data to different MySQL columns based on the value of the input, only problem is that I have not been able to find out any way to do that with Editor.

To clarify my question I draw this simple diagram which should highlight the main problem Sample diagram.

Best regards,
Riku

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    What I think you'll need to do is something like:

    if ( isset($_POST['action']) && ($_POST['action'] === 'edit' || $_POST['action'] === 'create' ) ) {
      if ( $_POST['data']['Value'] > 7.5 ) {
        ... update database.b
      }
    }
    

    If database.b is in the same table as database.a then Editor 1.5 will make this easier with server-side events. It will be available in about 2 weeks.

    Allan

  • KarfieldKarfield Posts: 8Questions: 2Answers: 0

    Thanks! Exactly what I was looking for.

This discussion has been closed.