Why I Cannot Execute delimiter ;; in Mysql


$di->set('modelsManager', 'Phalcon\Mvc\Model\Manager');

controller :

$model = $this->modelsManager->getWriteConnection(new Module());

$model->execute("delimiter //");

error code:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delimiter //' at line 1'

other SQL will be good. except the delimiter

I using Using Raw SQL In Pdo was good for running .


$dsn = 'mysql:host=localhost;dbname=xxxx';
$user = 'xxx';
$password = '123456';

try {
     $dbh = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
     echo 'Connection failed: ' . $e->getMessage();

$sth = $dbh->prepare("delimiter //");