标签:mysql fetch soc sso == cti etc func encode
function JSONQuery($sql,$type=1)
{
$db = new MySQLi($this->host,$this->uid,$this->pwd,$this->dbname);
$r = $db->query($sql);
if($type == 1)
{
return json_encode($r->fetch_all(MYSQLI_ASSOC));
}
else
{
return $r;
}
}
标签:mysql fetch soc sso == cti etc func encode
原文地址:http://www.cnblogs.com/gyzown/p/6897181.html