今天使用delete语句删除一张表中的一条信息时,提示了这么一个错误:1451 - Cannot delete or update a parent row: a foreign key constraint fails...错误代码为1451 在这里参考了一位园友的解决方案mysql删除外链解决办 ...
分类:
数据库 时间:
2019-03-29 20:38:27
阅读次数:
311
The set [1,2,3,...,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following seque ...
分类:
其他好文 时间:
2019-03-29 10:23:37
阅读次数:
185
u Mysql数据库的优化技术 对mysql优化时一个综合性的技术,主要包括 a: 表的设计合理化(符合3NF) b: 添加适当索引(index) [四种: 普通索引、主键索引、唯一索引unique、全文索引] c: 分表技术(水平分割、垂直分割) d: 读写[写: update/delete/ad ...
分类:
数据库 时间:
2019-03-28 13:58:30
阅读次数:
199
5、提高查询数据库性能相关的有什么方式? 加索引的方式:索引就是加速查询 :通过不断的缩小数据的范围筛选出最终想要的结果 索引又分为几大类? 索引分类 1.普通索引index :加速查找 2.唯一索引 主键索引:primary key :加速查找+约束(不为空且唯一) 唯一索引:unique:加速查 ...
分类:
数据库 时间:
2019-03-28 13:34:40
阅读次数:
203
首先数组分为一维数组和多维数组 1.一维数组 $a = array(a,b,c,d,a,b,e,f,g); array_unique($a) 就行了 2.二维数组 这时我们再用array_unique(),会报错,因为这个方法只能针对一维数组 1 function multi_array_unqie ...
分类:
编程语言 时间:
2019-03-27 10:56:16
阅读次数:
185
NGINX: 统计网站的PV、UV、独立IP Nginx: PV、UV、独立IP 做网站的都知道,平常经常要查询下网站PV、UV等网站的访问数据,当然如果网站做了CDN的话,nginx本地的日志就没什么意义了,下面就对nginx网站的日志访问数据做下统计; 概念: UV(Unique Visitor ...
分类:
Web程序 时间:
2019-03-26 15:23:16
阅读次数:
328
sqlite报错: sqlite3.IntegrityError: UNIQUE constraint failed: IMAGESTATUE.ID 解决方案: ...
分类:
数据库 时间:
2019-03-25 10:55:43
阅读次数:
875
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assume the ...
分类:
其他好文 时间:
2019-03-24 10:02:12
阅读次数:
119
1 import pymysql 2 3 HOST = '127.0.0.1' 4 PORT = 3306 5 USER = 'root' 6 PASSWD = '123456' 7 DB = 'test' 8 CHARSET = 'utf8' 9 10 conn = pymysql.connect... ...
分类:
数据库 时间:
2019-03-23 13:04:29
阅读次数:
240