Replies: 5 comments 6 replies
-
| Hi ! select * from headers;
select * from redirect_if_user_is_not_connected(sqlpage.cookie('session'));
select * from shell;Since it's the second time this comes up, I'll see how I can update the documentation and examples to make the pattern easier to find. And if this is still not enough, then I may add a  | 
Beta Was this translation helpful? Give feedback.
-
| 
 i didn't find this one elsewhere,  redirect_if_user_is_not_connected is a function then? or would it make more sense to have a table redirect(if,then,to): 
 not sure how to set it up | 
Beta Was this translation helpful? Give feedback.
-
| tnx, the if-then table approach sounded nice allowing for more rules, maybe even role dependent, but i guess then where would have to be (dynamic) sql inside the if column..; whereas with a function you would not need that | 
Beta Was this translation helpful? Give feedback.
-
| in general i think this table approach only works for simple setups, i mean using a select * from shells/headers/..; if we take the shell from the documentation example, it has for example 2 javascript columns (so a select * from shells would not be able to show that) whereas column names inside a table shell should be unique, (maybe using arrays?) | 
Beta Was this translation helpful? Give feedback.
-
| I am closing this as the functionality is now supported with  | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have really often the same begin in my sql file: session managment, check GET/POST inputs, shell, backward navigation, ...
When I need to make a change un theses parts, I have to go through all my files. I can find/replace of course but I can do mistake doing that.
I wonder if you has already considered to implement file inclusion. By that, I mean allowing a SQL file to call another zone like a directive "#include /check_usersession.sql"
Thanks for your work so far, sqlcode is amazing. 🚀
Beta Was this translation helpful? Give feedback.
All reactions