PHP learning four MySQL First contact

Source: Internet
Author: User

The IDs in the Mysql data table are typically self-incrementing auto_increment that increment themselves with the record of the database table

Mysql data table ID Primary key is this is the only value, there will be no duplicate values come out.

In Mysql, varchar (64) is simply to say that, when the length is less than the value, the length of the actual character occupied by the characters is stored, the length cannot exceed 64 meaning.

MYsql tinyint short integer plus a unsigned is 0-255, if not, then 128 to 127.

Mysql add data insert into User1 (name,password,email,age) VALUES (value 1, value 2, value 3)

Basic steps for database operations:

1. Get the connection mysql_connect

2. Get Database mysql_select_db ()

3. Set the Operation code

4. Send instructions to the database. mysql_query (command, connection handle)

5. Get a data from the return set, save to an array of mysql_fetch_row (); The subscript for the array represents the field.

PHP learning four MySQL First contact

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.