I'm not even sure if this is possible, but essentially I want to have a function stored within my MySQL database, so here I have my database
Database->pages:
[id] [name ] [content ] [enabled] [main] [parent]
[6 ] [login] [login();] [1 ] [0 ] [5 ]
Now I'll have the set returned
public function viewPage() {
global $db;
$query = <<<SQL
SELECT content
FROM pages
WHERE id = :getid
SQL;
$resource = $db->sitedb->prepare( $query );
$resource->execute( array (
':getid' => $_GET['id'],
));
foreach($resource as $row){
echo $row['content'];
}
}
Last but not least I have my viewPage.php page that has
$static->viewPage();
So when I go to viewPage.php?id=6 I want it to pull the data and since content is login(); I want it to call the login(); function which would be translated into an include file. Is this even possible?