Can you add a where clause in here?

Can you add a where clause in here?

kea0811kea0811 Posts: 10Questions: 2Answers: 1
edited April 2017 in Editor
$('#manageanswerset').on( 'click', 'a.deletebtn', function (e) {
        e.preventDefault();
        var test = $(this).closest('tr');
        editor
            .edit({ columns: 0 } )
            .set( 'Answer.DeletedBy', <?php echo $_SESSION['UserID'] ?> )
            .set( 'Answer.IsDeleted', 1 )
            .submit();
    } );

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Replies

  • allanallan Posts: 61,609Questions: 1Answers: 10,088 Site admin

    I'm not exactly where where you want your WHERE clause and what you want it to do? The WHERE conditions are normally used on the server-side as shown in the documentation.

    Allan

  • kea0811kea0811 Posts: 10Questions: 2Answers: 1

    Hi Allan,

    I want to update the value IsDeleted to 1 and DeletedBy to UserID where column 0 is = "something else"

    update table set isDeleted = 1 and DeletedBy = UserID where column 0 = "something else"

    If we have to do it in server side, is there any example that i can look into?

  • allanallan Posts: 61,609Questions: 1Answers: 10,088 Site admin

    Thanks for the clarification.

    It sounds like a perfect use case for the server-side events that the Editor libraries emit.

    Allan

This discussion has been closed.