PHP precompilation queries always fetch no data

Source: Internet
Author: User
PHP Prepare Fetch


', $rs _id, $rs _name, $rs _password);} $stmt->close (); $mysqli->close ();}

SQL statement can query out the data, I use PHP non-precompiled statements ($result = $mysqli->query ($query);) can also query the record, that is, the above query code is always fetched out of the fetch data, My PHP version is php-5.2.5-x64, the environment is 64-bit Win7, have met friends or know can give analysis, I have been troubled for 2 days .... Thank you.


Reply to discussion (solution)

The code doesn't look like a problem.
But if you copy your code directly, you can't pass the grammar check.

http://www.php.net/manual/en/mysqli.prepare.php

http://xiaobo-liu.iteye.com/blog/1288008

Settype ($seach _id, "integer");
Can omit

What output does not have? Are you sure you have entered if?

May be the configuration of their own machine some problems, finally decided to enable PDO, anyway, sooner or later need to learn new knowledge
And PDO is really better than mysqli, and this problem is solved.
PDO with proficiency is very convenient, and PDO prepare there is no above problem, should be the problem of their own configuration

  • 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.