MOVED mysql/project_get_type.sql to mysql/core_project_get_type.sql
authorAlan Knowles <alan@roojs.com>
Tue, 11 Oct 2016 03:09:41 +0000 (11:09 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 11 Oct 2016 03:09:41 +0000 (11:09 +0800)
mysql/core_project_get_type.sql [new file with mode: 0644]

diff --git a/mysql/core_project_get_type.sql b/mysql/core_project_get_type.sql
new file mode 100644 (file)
index 0000000..f4a757e
--- /dev/null
@@ -0,0 +1,11 @@
+
+DROP FUNCTION IF EXISTS project_get_type;
+DELIMITER $$
+CREATE FUNCTION project_get_type(in_id INT(11))  RETURNS VARCHAR(2) DETERMINISTIC
+    BEGIN
+        DECLARE v_ret VARCHAR(2);
+        SET v_ret= '';
+        SELECT type INTO v_ret  FROM Projects WHERE id = in_id LIMIT 1;
+        RETURN v_ret;
+    END $$
+DELIMITER ;
\ No newline at end of file