Let me get this straight:
1) You have a series of PHP commands stored into a MySQL database table, each correllated to an id number.
2) You want to extract the code from the database
3) you want to execute the extracted code.
Is this correct? If so, I might try to tackle it this way:
$select="select PHP_Code from Routines where id_num=\"$id\" ":
$result=mysql_query($select)
or die("Select from Routines table had errors.");
while ($row=mysql_fetch_array($result,MYSQL_ASSOC))
{
extract($row);
$PHP_Code;
}
I can't say for sure this would work, but it looks feasible at first glance.