This topic is locked

pseudo variables in sql

4/23/2008 12:16:49 PM
Suggestions
S
steveh author

Here's one that would make my life easier, if it were possibke to have symbol substitution in sql for a few internal symbols that would save a lot of time.
E.g. something liek this to substitute the userid?
select a,b,mydb.dbo.user_defined_function(c,{{USERID}}) from mytable
Where {{USERID}} would be replaced with the value of the current logged in user (maybe also provide a group name etc in other variables?)
I can think of quite a few places where this would make codign a lot easier.

Sergey Kornilov admin 4/24/2008

Steve,
we have a similar idea in mind - allow using PHP variables in WHERE clause.
Meanwhile you can use BeforeSQL query event to implement your logic.