2018年11月29日
摘要: 我们往往会被my-default.ini误导 其实这个文件就是个垃圾 C:\Program Files\MySQL\MySQL Server 5.7 不在这里 而是在这里"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" "--defaul 阅读全文
posted @ 2018-11-29 15:00 张彦山 阅读(39298) 评论(3) 推荐(4) 编辑
  2017年6月17日
摘要: over不能单独使用,要和分析函数:rank(),dense_rank(),row_number()等一起使用。其参数:over(partition by columnname1 order by columnname2)含义:按columname1指定的字段进行分组排序,或者说按字段columnn 阅读全文
posted @ 2017-06-17 10:08 张彦山 阅读(520) 评论(0) 推荐(0) 编辑
  2016年11月6日
摘要: 1.查询的模糊匹配 尽量避免在一个复杂查询里面使用 LIKE '%parm1%'—— 红色标识位置的百分号会导致相关列的索引无法使用,最好不要用. 解决办法: 其实只需要对该脚本略做改进,查询速度便会提高近百倍。改进方法如下: a、修改前台程序——把查询条件的供应商名称一栏由原来的文本输入改为下拉列 阅读全文
posted @ 2016-11-06 09:46 张彦山 阅读(289) 评论(0) 推荐(0) 编辑
  2012年8月11日
摘要: 在Visual Studio中,新建一个网站有两种方式:ASP.NET Web Site与ASP.NET Web Application。与Web Site相比,Web Application有很多优势。网上已经有很多文章来讲述它们的区别了,Visual Studio的官方博客有一篇文章讲述了它们各自的优劣点。这里以Visual Studio 2010为例,新建一个Web Site的操作如下:很简单。网站项目中除了该有的ASPX文件外,应该还有很多辅助的的CS文件,比如数据库操作的,字符串操作等等所谓的辅助类。很多时候,我们可以新建一个Class Library来包含这些文件,以达到代码复用的 阅读全文
posted @ 2012-08-11 08:54 张彦山 阅读(275) 评论(1) 推荐(1) 编辑
  2012年8月9日
摘要: using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Data.OleDb;using System.IO;/// <summary>/// Common 的摘要 阅读全文
posted @ 2012-08-09 10:45 张彦山 阅读(232) 评论(0) 推荐(0) 编辑
摘要: <script language="javascript" type="text/javascript">function change() { document.getElementById("imgCode").src="Code.aspx?"+Math.random();} <tr> <td align="center" valign="middle" class="Zitilansedenglu"> ... 阅读全文
posted @ 2012-08-09 10:43 张彦山 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 格式字符串 结果{0:d} YY-MM-DD{0:p} 百分比00.00%{0:N2} 12.68{0:N0} 13{0:c2} $12.68{0:d} 3/23/2003{0:T} 12:00:00 AM{0:男;;女}格式字符串 资料 结果"{0:C}" 12345.6789 -> $12,345.68"{0:C}" -12345.6789 -> ($12,345.68)"{0:D}" 12345 12345"{0:D8}" 12345 -> 00012345"{0:E}" 阅读全文
posted @ 2012-08-09 10:20 张彦山 阅读(233) 评论(0) 推荐(0) 编辑
  2012年8月3日
摘要: public static string GetSubString(string str) { if (str.Length > 15) { string str1 = str.Substring(0, 10) + "..."; return (str1); } else return (str); } 调用: <dd style="height: 25px"> ... 阅读全文
posted @ 2012-08-03 17:29 张彦山 阅读(216) 评论(0) 推荐(0) 编辑
  2012年8月1日
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /&g 阅读全文
posted @ 2012-08-01 09:21 张彦山 阅读(211) 评论(0) 推荐(0) 编辑
  2012年7月24日
摘要: 通过Javascript在客户端执行一定的验证然后再决定是否执行服务器端代码。这是一个很常用的功能。但是为此我花费了几个小时,才完全弄清楚。一般来说Javascript函数返回False,却服务器控件不会继续执行服务器端代码。一开始我这样写:<script type="text/javascript">function a() {if (confirm("是否充许执行客户端代码?")) {return true;}else {return false;}}</script></head><body>< 阅读全文
posted @ 2012-07-24 16:50 张彦山 阅读(270) 评论(0) 推荐(0) 编辑