We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed78380 commit 6757addCopy full SHA for 6757add
examples/user-authentication/create_user.sql
@@ -1,10 +1,10 @@
1
INSERT INTO user_info (username, password_hash)
2
VALUES (:username, sqlpage.hash_password(:password))
3
-ON CONFLICT (username) DO NOTHING -- this syntax is PostgreSQL-specific. In SQLite, use ON CONFLICT IGNORE.
+ON CONFLICT (username) DO NOTHING
4
RETURNING
5
'redirect' AS component,
6
'create_user_welcome_message.sql?username=' || :username AS link;
7
8
-- If we are still here, it means that the user was not created
9
-- because the username was already taken.
10
-SELECT 'redirect' AS component, 'create_user_welcome_message.sql?error&username=' || :username AS link;
+SELECT 'redirect' AS component, 'create_user_welcome_message.sql?error&username=' || :username AS link;
0 commit comments