projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
2b368f9
)
MOVED mysql/person_get_by_email.sql to mysql/core_person_get_by_email.sql
author
Alan Knowles
<alan@roojs.com>
Tue, 11 Oct 2016 03:06:52 +0000
(11:06 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 11 Oct 2016 03:06:52 +0000
(11:06 +0800)
mysql/core_person_get_by_email.sql
[new file with mode: 0644]
patch
|
blob
diff --git a/mysql/core_person_get_by_email.sql
b/mysql/core_person_get_by_email.sql
new file mode 100644
(file)
index 0000000..
a098e61
--- /dev/null
+++ b/
mysql/core_person_get_by_email.sql
@@ -0,0
+1,18
@@
+
+DROP FUNCTION IF EXISTS person_get_by_email;
+
+DELIMITER $$
+CREATE FUNCTION person_get_by_email(
+ in_addr VARCHAR(254)
+
+
+ ) RETURNS INT(11) DETERMINISTIC
+ BEGIN
+
+ DECLARE v_id INT(11);
+ SET v_id = 0;
+ SELECT id INTO v_id FROM Person WHERE email = in_addr LIMIT 1;
+ RETURN v_id;
+
+ END $$
+DELIMITER ;