PHP database Query order by with the data type returned by the query

Source: Internet
Author: User
Tags php database

<?PHP/** * Created by Phpstorm. * user:dy040 * DATE:2017/11/24 * time:9:40 * * Read a row of data from the result set * * * MYSQL_FETCH_ROW () * * *            MYSQL_FETCH_ASSOC () * * *array mysql_fetch_array (parameter 1, parameter 2) * Parameter 1: Execute SQL returned array collection such as query * Parameter 2 parameter 2 is constant is uppercase * Mysql_num returned as an indexed array * mysql_both associative array default * MYSQL_ASSOC mixed array * **//*connecting to a database*/include'./public/connect.php ';$sql= ' Select Id,title from 007_news ORDER by ID DESC limit 0, 5 '; //Dese Reverse order//ASC reverse$result=Mysqli_query($link,$sql); while($row=Mysqli_fetch_array($result)){    Print_r($row);}

PHP database Query order by with the data type returned by the query

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.