1, the left mouse button phpstudy icon, click on the MySQL manager, such as
2, choose Mysql-front, choose LocalHost to enter, you can see the database established locally. Then create a new database, such as:
3. On the new database, right-click New table, such as
4, new fields, such as
5, after the establishment of the table is to add data, add is in each column right-click Insert Record
6, the database of some basic syntax:
(1) Increase, insert a record in the Lqf_admin table, you can write in the SQL writer:
Insert into Lqf_admin (Id,username,password) VALUES (null, ' Zhang San ', ' 123456 '), (null, ' Zhang Si ', ' 123454321 '), (null, ' Five ', ' 1122 ') ;
Insert succeeds as follows:
(2) by deleting:
For example: Delete a record with an ID greater than 8, with the following code:
DELETE from Lqf_admin WHERE ID > 8;
(3) Modification:
For example: Change the password for username to Zhang San, and the code is entered as follows:
Update lqf_admin Set password = ' Change ' where userName = ' Zhang San ';
(4) Check:
A, query all data of a table;
b, the query username for Zhang Xi Records;
Use Phpstudy's own Mysql-front learning to build a database and basic MySQL statements