How do I get something out of the database?

Source: Internet
Author: User
How to get something out of the database
Database name: XL table: Page field has 5, id-name-title-text-time

After I connect the database, how to construct the SQL statement query ID greater than 0 of the table, the database inside the ID is automatically increased.

Sql= "SELECT * from Xl.page WHERE id>0"; This kind of don't know can.

How do I get the data to the page? I just know a function, but I don't know how to use it.

$res = mysql_query ($sql); Assign the data you've got to a variable

And then what about Mysql_num_rows ($res); So, I've tried this, show no data, if you want to call it separately
The time inside the field should be done. Thank you

------Solution--------------------
Mysql_query get a result set, multi-turn manual
PHP Code
$res = mysql_query ($sql), while ($row = Mysql_fetch_assoc ($res)) {        echo $row ["Time"];}
  • 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.