projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b04347f
)
MOVED mysql/company_get_name.sql to mysql/core_company_get_name.sql
author
Alan Knowles
<alan@roojs.com>
Tue, 11 Oct 2016 03:04:37 +0000
(11:04 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 11 Oct 2016 03:04:37 +0000
(11:04 +0800)
mysql/core_company_get_name.sql
[new file with mode: 0644]
patch
|
blob
diff --git a/mysql/core_company_get_name.sql
b/mysql/core_company_get_name.sql
new file mode 100644
(file)
index 0000000..
de0eb14
--- /dev/null
+++ b/
mysql/core_company_get_name.sql
@@ -0,0
+1,12
@@
+
+
+DROP FUNCTION IF EXISTS company_get_name;
+DELIMITER $$
+CREATE FUNCTION company_get_name(in_id INT(11)) RETURNS VARCHAR(254) DETERMINISTIC
+ BEGIN
+ DECLARE v_ret VARCHAR(254);
+ SET v_ret= '';
+ SELECT name INTO v_ret FROM Companies WHERE id = in_id LIMIT 1;
+ RETURN v_ret;
+ END $$
+DELIMITER ;
\ No newline at end of file