Basic exercises for MySQL database
- Creating a database

- Using a database

- Creating a table
- char: Fixed length, constant
- varchar: Variable
- Display table

- View table structure

- Insert data
SHA1(): Encrypt data function, create an encrypted character creation, its length is exactly 40 characters

- View all elements

-
WHERE conditional statement


- between … and…

-
LIKE / NOT LIKE
- Wildcard _: matches a single character; %: matches If 0 or more characters
- are added with () before the wildcard character, then _ or % are only used as original symbols and have no wildcard meaning.
- Queries with LIKE conditional statements are generally slower because they cannot take advantage of indexes, so this format should only be used when absolutely necessary



-
Sort order by ascending ASC Descending DESC
- The column to be sorted is of type ENUM, and the sorting will be based on the order in which the ENUM values were created in the column.

-
limit
- LIMIT Will improve query execution speed, because mysql still has to gather each record together and then truncate the list
-
-
- update, delete
- To prevent yourself from accidentally updating too many rows, you can apply a limit clause to update
- To clear a table, the preferred truncate: TRUNCATE TABLE tablename
- To delete all data in the table and Table itself: DROP TABLE tablename;
- To delete the entire database: DROP DATABASE databasename

- concat connection function

- concat_ws connection function

- length function

- format function

- concat is used with format function

- rand() function

- now(), curtime(), curdate( ) function

- date_format function
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i ').text(i));
};
$numbering.fadeIn(1700);
});
});
The above introduces PHP learning and practicing (5), including the content. I hope it will be helpful to friends who are interested in PHP tutorials.