This topic is locked

Truncate Operation with new Button

12/15/2014 8:49:39 PM
PHPRunner General questions
C
cjsaputo author

I have a table that we truncate every January and start new the following year. I decided to automate this by placing a button on the screen so that the Admin can click the button.
I added the new button and entered the following code:
truncate table entries;

alter table entries auto_increment = 1;
The syntax checker gives the following error: "Microsoft JScript complilation error: Expected ";" in line 1"
When I upload to the test environment nothing happens when I click the button.
Any thoughts woul be appreciated.

Sergey Kornilov admin 12/16/2014

The code you can use in button events is either Javascript (ClientBefore or ClientAfter) or PHP (Server event)
Your code is neither.