Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Class: SqlUtils

Namespace: utils

Methods

Format the whitespace in a SQL string to make it easier to read.

@param string $string The SQL string

@param bool $highlight If true, syntax highlighting will also be performed

@return string The SQL string with HTML styles and formatting wrapped in a

 tag

public static function format($string, $highlight = true)

Parameters:

  • $string
  • $highlight - Default: true

Compress a query by collapsing white space and removing comments.

@param string $string The SQL string

@return string The SQL string without comments

public static function compress($string)

Parameters:

  • $string

@todo Fazer phpDoc

@todo Analisar remover (não usada)

@param mixed $campo

public static function palavrasReservadasMysql($campo)

Parameters:

  • $campo

@todo Fazer phpDoc

@todo Analisar remover (não usada)

@param [type] $text

@return bool

public static function hasReservedWords($text)

Parameters:

  • $text