storing a function in a DB?
Posted on 2002-07-14
is it possible to do something like storing the function's body into a DB ?
so everyting my phpscript runs, it grabs the code from the DB?
cuz I have to construct querystring for so my script submit to differents forms on the web but not all form takes the same input and/or in a different way.
example: state, some will use the 2 letters code while other will take the full name
or date, some will have one field for date, while other may have a field for day, month and year.
so basically, I would do concatenation and other basic operation so it sends out the correct query string.
For each form, I would store the correct function into my DB.
The problem I see, is once I do something like
$sql = "SELECT * FROM myTable WHERE ID=1";
$result = ExecuteQuery($sql);
$result will contain the correct code.. but how can I RUN this code as a function?