I'm looking to see if it's possible to execute a raw SQL statement from a PHP controller action. Currently, I'm trying to execute a block of code that I build within the controller action to insert values into a table within my database...
$sql = "BEGIN INSERT INTO HOSTS VALUES('1', 'hostname1'); INSERT INTO HOSTS VALUES('2', 'hostname2'); END;";
$db->exec($sql);
Is something similar to the above code possible to be handled within a controller/action, or do I need to pursue a different route? Thank you in advance.