Exemple #1
0
 /**
  * Quotes a string so it can be used as a table or column name.
  * Dots are seen as seperator and are kept out of quotes.
  * 
  * Doesn't quote expressions without Query::BACKQUOTE_STRICT. This means it is not secure without this option. 
  * 
  * @param string   $identifier
  * @param int      $flags       Query::BACKQUOTE_%
  * @return string
  */
 public static function backquote($identifier, $flags = self::BACKQUOTE_STRICT)
 {
     return QuerySplitter::backquote($identifier, $flags);
 }
 public function testbackquote_Words()
 {
     $this->assertEquals('`count`(`abc`.`test`) AS `count`', QuerySplitter::backquote('count(`abc`.`test`) AS `count`', Query::BACKQUOTE_WORDS));
 }