-
@lovasoa Thank you for SQLPage. It is a very interesting concept and great software! Is there a way to combine them in one file and achieve the same effect? URL: delete_user.sql?user_id=1select 'alert' as component,
'Deleting id ' || coalesce($user_id,'-') as title;
select 'Continue' as title, 'delete_confirm.sql'|| COALESCE('?id=' || $user_id, '') as link;
select 'Cancel' as title, 'index.sql' as link; URL: delete_confirm.sql?user_id=1DELETE FROM "user"
WHERE id=$id::int
returning 'redirect' AS component,
'index.sql' as link; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The way you are doing it now is, I think, simple and idiomatic. If you really want to merge this into a single file, you can add a URL parameter: DELETE FROM "user" WHERE id=$user_id::int AND $confirmed IS NOT NULL
RETURNING 'redirect' AS component, 'index.sql' as link;
select 'alert' as component, 'Deleting id ' || $user_id as title;
select 'Continue' as title, '?confirmed&user_id=' || $user_id as link;
select 'Cancel' as title, 'index.sql' as link; |
Beta Was this translation helpful? Give feedback.
The way you are doing it now is, I think, simple and idiomatic. If you really want to merge this into a single file, you can add a URL parameter: