Re: [PHP] embedding PHP in MySQL

2003-09-18 Thread Marek Kilimajer
By default the evaled code is php, so you need to escape first: eval('?>'.$your_code_pulled_from_db.' Michael Winston wrote: I've been working on this for a few days and can't get it. I would like to stick some php code into a sql databases and be able to evaluate it when it's called up. Foe ex

RE: [PHP] embedding PHP in MySQL

2003-09-18 Thread Javier Tacon
Instead to eval the code, try to save the query result into a new file, then execute this file (require_once, include). Something like: function executeFromQuery($query) { global $DB; $file = "/tmp/temp.php"; $code = $DB->getOne($query); $fh = fopen($file,"w"); fwrite($fh,$code); fc