yii\db\Connection::quoteValue PHP Method

quoteValue() public method

Note that if the parameter is not a string, it will be returned without change.
See also: http://www.php.net/manual/en/function.PDO-quote.php
public quoteValue ( string $value ) : string
$value string string to be quoted
return string the properly quoted string
    public function quoteValue($value)
    {
        return $this->getSchema()->quoteValue($value);
    }

Usage Example

Beispiel #1
0
 /**
  * @deprecated this is broken by design, should use parameters instead
  * @param string $str
  * @return string
  */
 public function escapeSimple($str)
 {
     $str = $this->connection->quoteValue($str);
     if ($str[0] == "'") {
         return substr($str, 1, -1);
     }
     return $str;
 }
All Usage Examples Of yii\db\Connection::quoteValue