选择语言 :

 Driver_Database_Driver_Mongo::quote

Quote a value for an SQL query.

$db->quote(null); // 'NULL' $db->quote(10); // 10 $db->quote('fred'); // 'fred'

Objects passed to this function will be converted to strings. [Database_Expression] objects will use the value of the expression. [Database_Query] objects will be compiled and converted to a sub-query. All other objects will be converted using the __toString method.

string Driver_Database_Driver_Mongo::quote( mixed $value )
uses
Database::escape

参数列表

参数 类型 描述 默认值
$value mixed Any value to quote
返回值
  • string
File: ./drivers/database/mongo/mongo.class.php
public function quote($value)
{
    return $value;
}