Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
xtech Posted August 22, 2015 Posted August 22, 2015 Hi,i want to run a multi expression SQL statement from the SQL Toolbox. My goal is to create an event that runs periodically.I cannot insert it in the database as it seems SQL Toolbox is very limited and gives me an error saying there is an error in the statement. The thing is that this works as a charm through the MySQL command line. I cannot execute any of the statements individually as they need a variable. I do not want to create another plugin, app or anything, just to create this event. DELIMITER $$ CREATE EVENT A ON SCHEDULE EVERY 1 DAY STARTS '2015-08-25 07:00:00' DO BEGIN SET @hoje = UNIX_TIMESTAMP(NOW()); SQL expression 1 SQl expression 2 SQL expression 3 END$$ DELIMITER ;There is any way to execute this in SQL ToolBox?
Lukeroge Posted August 23, 2015 Posted August 23, 2015 Hi,i want to run a multi expression SQL statement from the SQL Toolbox. My goal is to create an event that runs periodically.I cannot insert it in the database as it seems SQL Toolbox is very limited and gives me an error saying there is an error in the statement. The thing is that this works as a charm through the MySQL command line. I cannot execute any of the statements individually as they need a variable. I do not want to create another plugin, app or anything, just to create this event. DELIMITER $$ CREATE EVENT A ON SCHEDULE EVERY 1 DAY STARTS '2015-08-25 07:00:00' DO BEGIN SET @hoje = UNIX_TIMESTAMP(NOW()); SQL expression 1 SQl expression 2 SQL expression 3 END$$ DELIMITER ;There is any way to execute this in SQL ToolBox?I'm not sure, but why not just use a cron job to run the SQL command? Should be easy.
BomAleold Posted August 23, 2015 Posted August 23, 2015 on 3.x the toolbox allowing a some of sql function... select alter update.. i think is same from ips4 tool mysql.if you have a phpmadmin check if you have privilege to create functio/event
xtech Posted August 23, 2015 Author Posted August 23, 2015 Yes but i have a customer running a forum on an IPS machine, and IPS guys do not provide ssh access.
BomAleold Posted August 23, 2015 Posted August 23, 2015 could you write a php script and set a daily cronjob, but also in this case i not know where resource are located (often on cpanel or ssh terminal..) on your case ips hosted
xtech Posted August 24, 2015 Author Posted August 24, 2015 As a followup, i've just found a way. Here it is:Don't use custom DelimitersDelete the MYSQL CommentsPut everything in one line.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.