Strange phenomenon, unknown problem. Please check it out. database query

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.