in reply to How to interpolate sql-output
That sql-query is stored in database, so I fetch it in order to use it to generate options to html-select.
It's much easier when you can manipulate sql-queries in 'admin-panel' and you don't have to wrote those to program-code.
Actually main idea is to make dynamic form-maker. So those queries have to be in databases.
It's like using db to query db.
One and maybe even easiest way is to implement limited variable-support with regexp.
Just wondering if this works:~s/($\w+)/$1/g
Maybe not, but there are ways...
At-least if one needs only limited number of variables.
It's ugly hack, but it'll work.
Just trying to find elegant solution which would deal all variables, like normal interpolation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to interpolate sql-output
by graff (Chancellor) on Jan 14, 2015 at 04:39 UTC | |
by Seq (Novice) on Jan 14, 2015 at 12:42 UTC |