×î¼òµ¥µÄ×î¸ßЧµÄ¹ýÂËSQL½Å±¾·À×¢Èë
.errInfo
{
border:solid 1px #d00;
background:#F7F0F7;
}
1.URLµØÖ··À×¢È룺
//¹ýÂËURL·Ç·¨SQL×Ö·û
var sUrl=location.search.toLowerCase();
var sQuery=sUrl.substring(sUrl.indexOf("=")+1);
re=/select|update|delete|truncate|join|union|exec|insert|drop|count|’|"|=|;|>|<|%/i;
if(re.test(sQuery))
{
alert("ÇëÎðÊäÈë·Ç·¨×Ö·û");
location.href=sUrl.replace(sQuery,"");
}
2.ÊäÈëÎı¾¿ò·À×¢È룺
ÒýÈëÒÔÏÂjs
//·ÀÖ¹SQL×¢Èë
function AntiSqlValid(oField )
{
re= /select|update|delete|exec|count|’|"|=|;|>|<|%/i;
if ( re.test(oField.value) )
{
//alert("ÇëÄú²»ÒªÔÚ²ÎÊýÖÐÊäÈëÌØÊâ×Ö·ûºÍSQL¹Ø¼ü×Ö£¡"); //×¢ÒâÖÐÎÄÂÒÂë
oField.value = ”;
oField.className="errInfo";
oField.focus();
return false;
}
ÔÚÐèÒª·À×¢ÈëµÄÊäÈëÎı¾¿òÌí¼ÓÈçÏ·½·¨
txtName.Attributes.Add("onblur", "AntiSqlValid(this)");//·ÀÖ¹Sql½Å±¾×¢Èë
Ïà¹ØÎĵµ£º
Load the SQL Server 2005 Driver for JDBC before you load the SQL Server 2000 Driver for JDBC. To do this, use the DriverManager class as in the following code example.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // 2005 version
Class.forName("com.microsoft.jdbc.sqlserver.SQLSe ......
[code=SQL][/code]
--Óï ¾ä ¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ ......
Õû¸öSQLºÍAsp.net(vb.net)Ò»Æð´ò°üµÄÈ«¹ý³ÌдһÏ¡£
Ò».×¼±¸±ØÒªµÄÎļþ
1. SQL½Å±¾Îļþ£¬Éú³ÉÒÔºó°²×°¹ý³ÌÖÐÐèÒªµÄ±íºÍ´æ´¢¹ý³ÌµÈµÈ£»
Éú³ÉÖ®ºó£¬¾ÍÔÝʱ°ÑËüÃüÃûΪdb.sql(×¢Òâ´óСд)
2.LisenceFile.rtfµÄ°²×°Îļþ£¬ÒòΪÎÒµÄϵͳÊǸöÈ˵쬶øÇÒfreeµÄ£¬ËùÒÔ¾ÍûÓÐ×ö¡£Õâ¸öÒÔºóÒ²ÊÇÒªÓõ½µÄ¡£
¶þ.ÔÚ×Ô¼ºÏÖÓеÄÏîÄ¿Àïà ......
SQL ServerÈ«ÎÄË÷ÒýµÄ¸öÈË×ܽá(ÉÏ) -¹ØÓÚÖÐÎÄ·Ö´Ê
(2005-11-14 04:29:44)
×ªÔØ
·ÖÀࣺÉî¶ÈÑо¿
´ó¼Ò¶¼ÖªµÀLIKE²éѯºÜÂý£¬È«ÎÄË÷Òý¾ÍÊÇÊÂÏÈ×öºÃÏà¹ØµÄË÷Òý£¬±íʾÄĸöÖ÷Ìâ´Ê¿ÉÒÔÔÚÄÄЩ¼Ç¼ÀïÕÒµ½£¬ÉõÖÁÊÂÏȼÆËãºÃRANK£¬¼ìË÷ʱ¿ÉÒÔ°ÑÏà¹Ø¶È¸ßµÄÏÈÁгöÀ´£¬Õâ¿ÉÒÔ´ó´óÌá¸ß¼ìË÷µÄËÙ¶È¡£
´ò¸ö±È·½£¬ÄãÓÐ ......
¼ÙÉèÏÖÔÚNews±íÓÐÒÔÏÂ×Ö¶Î
News_Id,News_Title,News_IsSetTop,News_SetTopTime
ÆäÖÐNews_IsSetTop(char(1))ÊÇ“ÊÇ·ñÖö¥”µÄº¬Ò壻News_SetTopTime(DateTime)ÊÇÖö¥Ê±¼ä£»
ÏÖÔÚҪʵÏÖ£ºÈç¹ûNews_IsSetTopΪ"1"ʱ £¬ORDER BY News_IsSetTop DESC,News_Id DESC£»News_IsSetTopΪ"0"ʱ£¬ORDER BY News_ID DESC ......