<?php
$result = mysql_query ('SELECT code FROM table');
$array = mysql_fetch_array ($result);
eval ($array['code']);
Note that eval starts as if its already PHP, so if you try to open <?php tags again it'll die. To get around that use:
eval ("?>" . $array['code'] . "<?php");
?>