上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: ORM框架: 1.SQLAlchemy: - 作用 1.提供简单的规则 2.自动转换成SQL语句 - DB first/code first DB first: 手动创建数据库以及表 ->ORM框架 ->自动生成类 code first: 手动创建类和数据库 ->ORM框架 ->以及表 a.功能 - 阅读全文
posted @ 2018-11-23 17:48 TY520 阅读(24306) 评论(0) 推荐(0) 编辑
摘要: 1视图: -创建 create view 视图名称 as SQL ps:虚拟 -修改 alter view 视图名称 as SQL -删除 drop view 视图名称 2触发器 3自定义函数: delimiter create function f1( i1 int, i2 int) return 阅读全文
posted @ 2018-11-10 21:12 TY520 阅读(24514) 评论(0) 推荐(0) 编辑
摘要: pymysql: - 连接、关闭(游标) - execute() -- SQL注入 sss' or 1=1 -- - 增删改: conn.commit() - fetchone fetchall - 获取插入数据自增ID 转储SQL文件 命令行: mysqldump 数据备份: 数据表结构+数据 m 阅读全文
posted @ 2018-11-04 15:45 TY520 阅读(23548) 评论(0) 推荐(0) 编辑
摘要: desc 表名 --查看表属性 show create table 表名 \g; --查看代码 alter table 表名 auto_increment=20; --改自增的值 MySQL:自增步长 基于会话级别: show session variables like 'auto_inc%'; 阅读全文
posted @ 2018-11-04 15:44 TY520 阅读(24426) 评论(0) 推荐(0) 编辑
摘要: desc 表名 --查看表属性 show create table 表名 \g; --查看代码 alter table 表名 auto_increment=20; --改自增的值 MySQL:自增步长 基于会话级别: show session variables like 'auto_inc%'; 阅读全文
posted @ 2018-10-30 22:37 TY520 阅读(21571) 评论(0) 推荐(0) 编辑
摘要: MySQL数据库: 引擎:innodb( 支持事务,原子性操作), myisam 默认:用户root create database "数据库名" default charset utf8; show databases; drop database "数据库"; (删除数据库) use 数据库名称 阅读全文
posted @ 2018-10-29 22:41 TY520 阅读(20114) 评论(0) 推荐(0) 编辑
摘要: 使用方法 from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column # 列 from sqlalchemy import Integer, String, Text, Date, Dat 阅读全文
posted @ 2018-10-24 23:02 TY520 阅读(19670) 评论(0) 推荐(0) 编辑
摘要: Django 登入效验 .py from django import forms from student import models from django.core.exceptions import ValidationError from django.core.validators imp 阅读全文
posted @ 2018-10-21 17:37 TY520 阅读(19424) 评论(0) 推荐(0) 编辑
摘要: flask版 .py from flask import Flask, render_template, request, session, current_app, g, redirect from wtforms import Form from wtforms.fields import si 阅读全文
posted @ 2018-10-21 17:30 TY520 阅读(2596) 评论(0) 推荐(0) 编辑
摘要: CPU密集型进程池线程池比较 import math from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor import time PRIMES = [112272535095293] * 100 # 判断素数 阅读全文
posted @ 2018-08-15 10:18 TY520 阅读(2685) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 下一页