error);} else { //printf("设置当前字符集: %s\n", $mysq">
时间:2021-07-01 10:21:17 帮助过:27人阅读
//数据库连接set_charset("utf8")) { printf("字符集utf8加载错误: %s\n", $mysqli->error);} else { //printf("设置当前字符集: %s\n", $mysqli->character_set_name());}$mysqli->query("set names 'utf8'");//写库$mysqli->query("set character set 'utf8'");//读库//$mysqli->close();
include './xitong/LianJieMySql.php';//查询 if ($row = $mysqli->query("select * from yonghu where MingZi_ShouJi = '$u'and MiMa='$p'")) { $r=$row->fetch_array(); print_r($r); }else { echo mysql_error(); }
更奇怪的是.在phpmyadmin里查询
select * from yonghu where mingzishouji = '134213213';
也是0条返回.这个字段是有134213213
如果直接执行 select * from yonghu
的话,是可以print_t 的.
1但加入 where mingzishouji = '123' 就无法查询了. 该字段是有这123存在.
好了.是我见鬼了.原来是字段里的错误.