数据库相关 - 军军小站|张军博客
数据库相关

copyright symbol issue

下面这段代码是调用java的Service获取PDF的字节数组,但是在生成的报告中,商标符号前面多了一个字符,后来为ContentType添加了charset=utf-8,就解决了这个问题。req.ContentType="application/x-www-form-urlencoded;charset=utf-8";byte[]result=null;stringurl=ConfigurationManager.AppSettings["iTextJa

系统 2019-08-12 01:33:52 1932

数据库相关

sql中索引不会被用到的几种情况

1、查询谓词没有使用索引的主要边界,可能会导致不走索引。比如,你查询的是SELECT*FROMTWHEREY=XXX;假如你的T表上有一个包含Y值的组合索引,但是优化器会认为需要一行行的扫描会更有效,这个时候,优化器可能会选择TABLEACCESSFULL,但是如果换成了SELECTYFROMTWHEREY=XXX,优化器会直接去索引中找到Y的值,因为从B树中就可以找到相应的值。2、如果在B树索引中有一个空值,那么查询诸如SELECTCOUNT(*)FRO

系统 2019-08-12 01:55:28 1931

数据库相关

CI公用输入过滤处理函数

/***自动过滤变量,进行XSS,去空*支持:单个字符串,多维数组,数字*@paramtype$param='常规字符串'或array('字符串1','字符串2');*@returnstring|array*/finalprotectedfunctionhtml_trim($param=''){if(is_array($param)&&!empty($param)){returnhtml_escape($param);}if(is_string($para

系统 2019-08-12 01:55:25 1931

数据库相关

Uva 11401 - Triangle Counting

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2396要注意细节代码:#include#include#include#include#include#include#definelllonglongusing

系统 2019-08-12 01:55:09 1931

数据库相关

SQL游标使用

---使用循环控制declare@aintset@a=0while@a<10beginprint@aset@a=@a+1end--获取系统时间selectgetdate()execsp_addlinkedserver'mailoudb','',''EXECsp_addlinkedserver'DBLink','','SQLOLEDB','192.168.1.168'EXECsp_addlinkedsrvlogin'DBLink','false',null,

系统 2019-08-12 01:54:54 1931

数据库相关

正规表达