Is it possible to redeclare a MySQL function every time you refresh, this is my code
mysql_query("
DROP FUNCTION IF EXISTS Add_num;
CREATE FUNCTION Add_num(LAT_A INT)
RETURNS INT
READS SQL DATA
DETERMINISTIC
BEGIN
DECLARE Ans BIGINT;
SET Ans = LAT_A + 2;
RETURN Ans;
END");
even though I have the line DROP FUNCTION IF EXISTS Add2;
the function stays the same when refreshing. For example I changed the 2
to 3
in the line SET Ans = LAT_A + 2;
and then refreshed and it still adds 2
not 3
.