2020年8月13日
摘要: <head> <meta charset="UTF-8"> <title>Title</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="styleshee 阅读全文
posted @ 2020-08-13 21:58 -脑子坏了- 阅读(279) 评论(0) 推荐(0) 编辑
2020年5月11日
摘要: GET http://127.0.0.1:8001/static/jquery-3.5.1.js 404 (Not Found) <script src="/static/jquery-3.5.1.js"></script> 修改之后 <script src="https://cdn.bootcss 阅读全文
posted @ 2020-05-11 16:42 -脑子坏了- 阅读(703) 评论(0) 推荐(0) 编辑
2020年5月6日
摘要: $("#test").html() //意思是指:获取ID为test的元素内的html代码。其中html()是jQuery里的方法 // 这段代码等同于用DOM实现代码: document.getElementById(" test ").innerHTML; //虽然jQuery对象是包装DOM对 阅读全文
posted @ 2020-05-06 08:45 -脑子坏了- 阅读(170) 评论(0) 推荐(0) 编辑
2020年5月2日
摘要: 1 django默认支持sqlite,mysql, oracle,postgresql数据库。 <1> sqlite django默认使用sqlite的数据库,默认自带sqlite的数据库驱动 , 引擎名称:django.db.backends.sqlite3 <2> mysql 引擎名称:djan 阅读全文
posted @ 2020-05-02 15:26 -脑子坏了- 阅读(403) 评论(0) 推荐(0) 编辑
2020年5月1日
摘要: if {% if d.age > 20 %} {% if d.age < 50 %} <h1>{{ d.name }}的年龄大于20小于50</h1> {% else %} <h1>hello{{ d.name }}</h1> {% endif %} {% elif d.age > 10 %} <h 阅读全文
posted @ 2020-05-01 16:29 -脑子坏了- 阅读(131) 评论(0) 推荐(0) 编辑
2020年4月30日
摘要: -- start transaction 开启事务 -- Rollback 回滚事务,即撤销指定的sql语句(只能回退insert delete update语句),回滚到上一次commit的位置 -- Commit 提交事务,提交未存储的事务 -- -- savepoint 保留点 ,事务处理中设 阅读全文
posted @ 2020-04-30 16:18 -脑子坏了- 阅读(137) 评论(0) 推荐(0) 编辑
摘要: import pymysql conn = pymysql.connect(host='127.0.0.1',port=3306,user='root',\ passwd='123456',db='lesson54') cursor = conn.cursor(cursor=pymysql.curs 阅读全文
posted @ 2020-04-30 15:49 -脑子坏了- 阅读(138) 评论(0) 推荐(0) 编辑
摘要: (1)直接创建索引 CREATE INDEX index_name ON table(column(length)) CREATE UNIQUE INDEX zipindex on ec_address(FIRST_LETTER(3)) mysql> create index index_name 阅读全文
posted @ 2020-04-30 14:36 -脑子坏了- 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 创建两张表 mysql> create table employee( -> emp_id int auto_increment primary key not null, -> emp_name varchar(50), -> age int, -> dept_id int -> ); mysql 阅读全文
posted @ 2020-04-30 09:45 -脑子坏了- 阅读(1796) 评论(0) 推荐(0) 编辑
2020年4月29日
摘要: 创建表1 mysql> CREATE TABLE C( -> -> id TINYINT PRIMARY KEY auto_increment, -> name VARCHAR (20), -> age INT , -> is_marriged boolean -- show create tabl 阅读全文
posted @ 2020-04-29 21:03 -脑子坏了- 阅读(2442) 评论(0) 推荐(0) 编辑