PHP mysql extension issues with mysqli extension query results

Source: Internet
Author: User
Tags php mysql php mysql extension
PHP mysql extension issues using MYSQLI to extend query results
Background:
Change some of the MySQL extensions in the system to use mysqli extensions.

The problem arises:
Since the code is interleaved, there are many places where you use Mysql_fetch_array () to use the Mysqli_query () function result, whereas the mysql_fetch_array () function has a resource type, mysqli_query The result of the () function is Mysqli_result type, so there will be a lot of "mysql_fetch_array () expects parameter 1 to be resource, object given ..." in error log. Alarm.

Is there any way to resolve if Mysqli_result can be converted into effective resource

------Solution--------------------
I have been human flesh to modify the code. Fortunately, the code is not much, in fact, with MySQL good
------Solution--------------------
I think it would be nice to change it to the same.
In fact, the code will still have a lot of problems, in case the database is changed to Oracle??
It is recommended that you use the same interface, such as using PDO operations.
------Solution--------------------
Explore

The point is, I have too much code.
Reference:

I have been human flesh to modify the code. Fortunately, the code is not much, in fact, with MySQL good
  • Related Article

    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.