codice è il seguente, dove mi propongo di usare pdo_mysql:ZF2 - Zend Db Adapter Platform :: getQuoteIdentifierSymbol()
use \Zend\Db\Adapter\Adapter;
use \Zend\Db\Sql\Sql;
use \Zend\Db\Sql\Expression;
$params = array(
'driver' => "Pdo_mysql",
'host' => &$this->Registry->config[ 'sql' ][ 'host' ],
'username' => &$this->Registry->config[ 'sql' ][ 'user' ],
'password' => &$this->Registry->config[ 'sql' ][ 'passwd' ],
'dbname' => &$this->Registry->config[ 'sql' ][ 'dbname' ]
);
$this->adapter = new \Zend\Db\Adapter\Adapter($params);
$this->platform = $this->adapter->getPlatform();
$this->sql = new Sql($this->adapter);
E quando ho check simbolo identificativo-preventivo con:
print $this->platform->getQuoteIdentifierSymbol(); // Output: "
Come si può vedere, il doppio è il simbolo. Questo ovviamente invalida tutte le mie query MySQL, poiché riporta tutti i nomi identificativi (tabelle, colonne, ecc.) Con virgolette (") invece di virgolette (`).
Quindi, perché il driver PDO-MySQL utilizza Il simbolo Sql92 invece? E come risolverlo?
Perché la "nuova frase Sql", dovresti preparare e eseguire query da $ t il suo-> adattatore – Ashley
Hanno tutti i loro usi, Ashley. –