PHP5 connection to mysql data Class _ PHP Tutorial

Source: Internet
Author: User
PHP5 connects to the mysql data class. @ $ Dbnewmysqli_connect (host, user name, password, database name); connect to database $ SQL; $ result $ db-query ($ SQL); execute SQL statements $ num_results $ result-unm_rows; return line @ $ db = new mysqli_connect (host, user name, password, database name); // connect to the database

$ SQL = "";

$ Result = $ db-> query ($ SQL); // execute an SQL statement

$ Num_results = $ result-> unm_rows; // number of returned rows

$ Row = $ result-> fetch_row ($ result); // retrieves a row of data or

$ Row = $ result-> object (); // returns a row of data to an object, for example, $ row-> title
  • Source: programming home
  • Http://www.bkjia.com/PHPjc/486232.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486232.htmlTechArticle@ $ db = new mysqli_connect (host, user name, password, database name); // Connect to database $ SQL = ""; $ result = $ db-query ($ SQL ); // execute the SQL statement $ num_results = $ result-unm_rows; // returns the row...

    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.