quote() public method

public quote ( $string )
echo "_______________\n";
$database->select("bccount", array("user_name", "email"), array("user_id[<]" => 20));
var_dump($database->error());
/*
 * 查看上一条query
 */
echo "_______________\n";
$last_user_id = $database->insert("test", array("user" => "fooa", "email" => "*****@*****.**", "id" => 25, "pwd" => "smart", "name" => array("en", "fr", "jp", "cn")));
echo $database->last_query();
/*
 * quote函数,单引号
 */
echo "_______________\n";
$data = "Medoo";
echo "we love" . $data . "\n";
echo "we love" . $database->quote($data);
/*
 * query()函数
 */
echo "_______________\n";
$data1 = $database->query("select * from test")->fetchAll();
print_r($data1);
/*
 * where的使用
 */
echo "_______________\n";
$re = $database->select('test', 'user', array("id" => 25));
echo $re[0];
/*
 * where的使用(in)
 */
Example #2
0
 /**
  * @param $where
  * @return string
  */
 public function where_clause($where)
 {
     return $this->_writer->quote($where);
 }