Re: [PHP-DB] Storing Code in a db?
At 27.06.2001 14:06, you wrote: Hey there, Is it possible to store code like a function, for example, in a mysql database and pull it into a php dynamicallly so you can use the function if needed? Not in a way that would be effective, the only way I could see it work is if you use a script to pull the function out of the database, write it to a file, and then include your newly written file... Which ofcourse would require a reload or 2 scripts. I'd stick with a couple of includes if I were you =). -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Storing Code in a db?
Mark @ 10base-t pressed the little lettered thingies in this order... Hey there, Is it possible to store code like a function, for example, in a mysql database and pull it into a php dynamicallly so you can use the function if needed? Yes, it is possible, but you need to run the code through eval() for it to do anything useful. ie while ($row = mysql_fetch_row($result)) { echo eval($row[0]); } Good luck... Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com Meeting cutting edge dynamic web site needs For a good time, http://www.AppIdeas.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Storing Code in a db?
It's possible. Store the function as a text field, retrieve it and use eval($fieldvalue); Hey there, Is it possible to store code like a function, for example, in a mysql database and pull it into a php dynamicallly so you can use the function if needed? Mark Leo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Storing Code in a db?
Hey there, Is it possible to store code like a function, for example, in a mysql database and pull it into a php dynamicallly so you can use the function if needed? Mark