Data existing check before inserting a record in SQL

Please let me continue to ask you here, I got error from the same server actions.

What I want do is to avoid duplicate voting on the same poll from the same user, to do so I made these steps. but I got this 1054 error now.

(1)Get an userID from the database
(2)If the record exists, the error message returns, if not the new record will be inserted. A condition for this part is a combination of eventID and userID(from (1)).

19

Well, the error message clearly shows what is the problem. In some of the steps you are referencing to a column which does not exist.
Either you have deleted it, or renamed it after the server action has been created…

yes, this “idusers” doesn’t exist anymore, but I can not find this setting on any steps of server actions…

Open the database connection step and Re-save it.
Open the query step and check your conditions for this step, then refresh the columns list in the query builder. Re-save your server action.

1 Like

Actually, I tried what you said but the same error returned. So I re-created a new server action, then it worked! thanks!