Strange phenomenon, unknown problem. Please check it out. database query
// Database connection
Set_charset ("utf8") {printf ("character set utf8 loading error: % s \ n", $ mysqli-> error );} else {// printf ("set current character set: % s \ n", $ mysqli-> character_set_name ());} $ mysqli-> query ("set names 'utf8'"); // write database $ mysqli-> query ("set character set 'utf8 '"); // read the database // $ mysqli-> close ();
Include '. /xitong/LianJieMySql. php '; // query 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 ();}
When the name and password are correct, and the database connection is normal, it cannot be queried. how can I find this problem if it is incorrect?
Reply to discussion (solution)
What's more, query in phpmyadmin
Select * from yonghu where mingzishouji = '000000 ';
It is also returned by 0. this field has 134213213
If you directly execute select * from yonghu
It can be print_t.
1. However, if you add where mingzishouji = '000000', you cannot query it. this field exists in the 123 format.
Okay. it's just me. it turns out that it's a field error.