苦楝树

万物伊始...

导航

2015年1月27日 #

怎么绕过前端的判断提交

摘要: 今天测试到一个输入框限制了长度但DB里面是有这个数据的所以我猜想后台是可以提交的于是问了某人,告诉我这么改就好了F12把maxlength改大点就能提交成功了 阅读全文

posted @ 2015-01-27 17:27 苦楝树 阅读(256) 评论(0) 推荐(0) 编辑

2015年1月22日 #

Oracle数据库like和not like使用

摘要: select * from iw_user where email not like '%@%' and length(email)=11View Code查询手机号注册的记录而不是邮箱查询2开头的记录select * from beyond_pay_offline where amount lik... 阅读全文

posted @ 2015-01-22 18:01 苦楝树 阅读(16668) 评论(0) 推荐(0) 编辑

2015年1月21日 #

Oracle数据库根据时间查询

摘要: select * from mini_account_log_pt_75 where account_no='30020000006446750156' and trans_dt between to_date('2010-12-01 00:00:00','YYYY-MM-DD HH24:MI:SS... 阅读全文

posted @ 2015-01-21 16:23 苦楝树 阅读(668) 评论(0) 推荐(0) 编辑

查询数据库重复记录

摘要: select * from iw_user where cert_no in (select cert_no from iw_user group by cert_no having count(cert_no)=2)View Code一开始用>2,结果出来很多身份号码空的记录,这个问题的解决办法只... 阅读全文

posted @ 2015-01-21 16:05 苦楝树 阅读(133) 评论(0) 推荐(0) 编辑

2014年7月17日 #

python操作mysql数据库

摘要: 连接数据库 输入值 存入数据库 关闭import stringimport mysql.connectorconn=mysql.connector.connect(user='root',password='test',database='dalian',use_unicode=True)curso... 阅读全文

posted @ 2014-07-17 18:13 苦楝树 阅读(222) 评论(0) 推荐(0) 编辑

2014年4月11日 #

python的路径

摘要: 原来可以这么用和那么用os.mkdir('d:\\su\\help1')os.mkdir('d:/su/help')为啥提供俩种呢 真乱 阅读全文

posted @ 2014-04-11 16:26 苦楝树 阅读(192) 评论(0) 推荐(0) 编辑

python的rename原来这么用

摘要: 本来想实践应用一下如何批量修改,后来一想怎么那么麻烦,连最基本都都不会,简化到这份上再慢慢复杂之一开始用help(os.rename)查了该方法的用法,出来的解释太简单了,以为路径用的是和windows一样的反斜杠,于是怎么都没修改成功后来查了资料,别人都用的斜杠,于是就对了,说到这,打死了一只大蚊子...>>> os.rename("D:/su/123.txt","D:/su/456.txt")成功的改了文件名以前好像是会用相对路径的,想想练练>>> os.rename("/a","/m 阅读全文

posted @ 2014-04-11 15:16 苦楝树 阅读(7588) 评论(1) 推荐(0) 编辑

2012年2月25日 #

python tutorial

摘要: 阅读全文

posted @ 2012-02-25 00:52 苦楝树 阅读(157) 评论(0) 推荐(0) 编辑

2011年11月20日 #

Python--文件

摘要: file=open('filename','mode') 打开文件,filename-文件名,mode模式有r,w,a,rb,wb,w+file1=file.read()读文件,括号可加数字,代表读多少字节 readlines()参数可为序列file2=file.write()写文件,writelines()参数可为序列>>>file=open('b.txt','r+w')>>>file.mode>>>'w'>>>file.name>&g 阅读全文

posted @ 2011-11-20 22:57 苦楝树 阅读(327) 评论(0) 推荐(0) 编辑

2011年11月19日 #

Python合并2个文件

摘要: # -*- coding: utf-8 -*-import os#print __name__ #exitf1=open('/cygdrive/d/1/a.txt', 'r')f2=open('b.txt', 'a')f2.write(f1.read())f1.close()f2.close()读取的方式打开文件a.txt追加模式打开文件b.txt从a.txt中读出的内容写入b.txt最后关闭文件在open的时候制定'a'即为(append)模式,在这种模式下,文件的原有内容不会消失,新写入的内容会自动被添加到文件 阅读全文

posted @ 2011-11-19 01:37 苦楝树 阅读(276) 评论(0) 推荐(0) 编辑