Is there a way to check the value in a column to make sure that no other rows have the same value in the same column?
EXAMPLE: A MySQL table has a UserCode column. Each row in the table must have a unique value for this column. If an attempt is made to enter a UserCode that already exists, then I want to show an error message.
In the UserCode column, I am using a custom edit function.
Any help would be appreciated…thanks!
P.S. — If the custom edit was PHP function, then I could easily do what I need, but it looks like the custom edits all have to be written in JavaScript.
2 Answers
Hello,
Please refer demos/editing/server-validation.php.
It has working example how to apply unique and other business checks and show message on client.
Your Answer