Skip to content
Permalink
Browse files

Use built-in methods instead of string concatenation.

  • Loading branch information...
markstory committed Mar 24, 2013
1 parent ee28c5e commit e9aff21e7c3737d33005b95227c13d5c59fb6125
@@ -31,7 +31,7 @@ trait MysqlDialectTrait {
* @return array An array of (sql, params) to execute.
*/
public function listTablesSql($config) {
return ["SHOW TABLES FROM `{$config['database']}`", []];
return ["SHOW TABLES FROM " . $this->quoteIdentifier($config['database']), []];
}
/**
@@ -25,6 +25,20 @@ class Mysql extends \Cake\Model\Datasource\Database\Driver {
use PDODriverTrait;
use MysqlDialectTrait;
/**
* String used to start a database identifier quoting to make it safe
*
* @var string
**/
public $startQuote = '`';
/**
* String used to end a database identifier quoting to make it safe
*
* @var string
**/
public $endQuote = '`';
/**
* Base configuration settings for MySQL driver
*

0 comments on commit e9aff21

Please sign in to comment.
You can’t perform that action at this time.