Hi all,
I've been attacking google for a while and not had much success
I'm trying to create a sort of update button, when when a user clicks on a HTML Perl button, asks for confirmation (yes/no). If the user clicks "Yes", it runs a SQL script, then returns a pop-up (JavaScript) saying operation successful (or not).
The SQL code is creating a backup table, then copying the current values stored in the database to this backup table, so no screen refresh is necessary. The complete and functioning code is provided below:
Code:
CREATE TABLE IF NOT EXISTS backup_tab_right_mapping
LIKE tab_right_mapping;
DELETE FROM backup_tab_right_mapping
WHERE group_id = "1"
AND role_id = "1";
INSERT INTO backup_tab_right_mapping
SELECT * FROM tab_right_mapping
WHERE group_id = "1"
AND role_id = "1";
However I dont want to use PHP or CGI, I'm looking for a Sub solution.
Thanks for your time and any help you can provide XD