Jump to content

How to execute multiexpression SQL from SQL Toolbox in ACP?

Featured Replies

Posted

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?

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.

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

 

 

  • Author

Yes but i have a customer running a forum on an IPS machine, and IPS guys do not provide ssh access.

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

  • Author

As a followup, i've just found a way. Here it is:

  1. Don't use custom Delimiters
  2. Delete the MYSQL Comments
  3. Put everything in one line.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.