php select查询时,字符编码处置

WBOY
Release: 2016-06-13 12:31:21
Original
1065 people have browsed it

php select查询时,字符编码处理,
require("db.php");
$sql="SELECT `cityid` FROM `weathercityid` where `city`='广东'";
$result=mysql_query($sql);
var_dump($result);
$a_city=mysql_fetch_array($result);
print_r($a_city);
?>
输出结果为
广东
resource(5, mysql result)
 
 如果把 把广东换成是 数字是字符就可以成功,这个是怎么回事?

select iconv
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template