A blog by the explanation, we need to operate the database using orm installed pymysql and sqlalchemy module, then we deletions simple change to the database search:
1, import module:
2, creates a connection to the base class:
here mysql: // scott: tiger @ hostname / dbname can hold down CTRL + left mouse button to find the source code:
format:
MySQL: // database Username: database password @ip address / name of the database
3, add the primary table associated with Table classes:
a class representing a table
4, main functions will create a table of the class object instance:
Here it will be the class object is similar to the cursor pymysql
5, insert data:
After inserting data into the same data repeatedly bound error, then we add the try statement:
6, query data:
(1) all data query name and age:
operating results;
(2) a single query data:
(3) the query conditions:
7, modify the data:
8, delete the data:
Additions and deletions to the database must commit to database
These are the additions and deletions to change search orm operation of the database, we want to be able to help
automate the test group: 762,141,168
welcome you to test your friends to join and progress together, work together!