setsetting.sql 247 B

12345678910111213
  1. CREATE FUNCTION `setsetting`(
  2. a_name VARCHAR(50),
  3. a_value VARCHAR(100)
  4. ) RETURNS VARCHAR(100)
  5. DETERMINISTIC
  6. MODIFIES SQL DATA
  7. SQL SECURITY INVOKER
  8. BEGIN
  9. UPDATE settings
  10. SET value = a_value
  11. WHERE name = a_name;
  12. return getsetting(a_name);
  13. END;