I tried this with two types of executes but neither worked.
I would also like to be able to add procedures and triggers to the database automatically as well. Im guessing they would need to be done the same way
Code: Select all
on mouseUp
put "USE `thisDbase`;" & cr into theSQL
put "DROP function IF EXISTS `thisFunction`" & cr after theSQL
put "DELIMITER $$" & cr after theSQL
put "USE `thisDbase` $$" & cr after theSQL
put "CREATE FUNCTION `thisFunction` (input1 int(1))" & cr after theSQL
put "RETURNS INTEGER" & cr after theSQL
put "BEGIN" & cr after theSQL
put "RETURN input1;" & cr after theSQL
put "END$$" & cr after theSQL
put "DELIMITER;" & cr after theSQL
revdb_execute(gConnectionIF,theSQL)
//revExecuteSQL gConnectionID,theSQL
End mouseUp