|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
对于中小型web应用来说,php有很强的竞争力,linux+apache+mysql+php(lamp)的组合几乎可以胜任绝大多数网站的解决方案,对于大型应用来讲,对于系统架构要求更高,需要有成熟的框架支持,jsp的struts是个不错的框架,国内介绍它的资料也非常多,应用逐渐广泛起来。asp就不用说了,js|jscript|服务器|客户端|语句|实行|js|jscript|服务器|客户端<%@LANGUAGE="JAVASCRIPT"CODEPAGE="936"%>
<%
varQuestStringBuilder=function(){
//1->查询语句,2->更新语句,3->删除语句,4->拔出语句
varQuestType=0;
varFields=[];
varValues=[];
varCondition;
varPK;
varPkeySort;
varTableName;
varState=false;
varCLogic="AND";
varCOperator="=";
this.addField=function(Field,Value){
Fields.push(processField(Field));
Values.push(processValue(Value));
};
this.addCField=function(CField,CValue){
varsTemp=[];
if(Condition!=undefined&&Condition!=""){sTemp.push(Condition);}
if(COperator!="LIKE"){
sTemp.push(processField(CField)+COperator+processValue(CValue));
}else{
sTemp.push(processField(CField)+"LIKE%"+CValue+"%");
}
Condition=sTemp.join(CLogic);
if(Condition==""){Condition=sTemp.toString();}
};
this.Table=function(s){TableName=s;};
this.PKey=function(s){PK=processField(s);};
this.PKeyAsc=function(){PkeySort="ASC";};
this.PKeyDesc=function(){PkeySort="DESC";};
this.getSelect=function(){
QuestType=1;
returnresult();
};
this.getUpdate=function(){
QuestType=2;
returnresult();
};
this.getDelete=function(){
QuestType=3;
returnresult();
};
this.getInsert=function(){
QuestType=4;
returnresult();
};
this.clear=function(){
Fields=[];
Values=[];
PK=undefined;
PkeySort=undefined;
TableName=undefined;
State=false;
};
this.ActionState=function(){returnState;};
this.ChangeLogic=function(s){CLogic=""+s.toUpperCase()+"";};
this.ChangeOperator=function(s){COperator=s.toUpperCase();};
varresult=function(){
varstrTemp;
if(Fields.length==0)Fields.push("*");
switch(QuestType){
case1:
if(TableName!=undefined&&TableName!=""){
strTemp="SELECT"+Fields.toString()+"FROM"+TableName;
if(Condition!=undefined){strTemp+="WHERE"+Condition;}
if(PkeySort!=undefined&&PK!=undefined){strTemp+="ORDERBY"+PK+""+PkeySort;}
State=true;
}else{
strTemp=getError(0);//请求输出表名
}
returnstrTemp;
break;
case2:
if(TableName!=undefined&&TableName!=""){
strTemp="UPDATE"+TableName+"SET"+process(Fields,Values);
if(Condition!=undefined){
State=true;
strTemp+="WHERE"+Condition;
}else{
strTemp=getError(1);
}
}else{
strTemp=getError(0);//请求输出表名
}
returnstrTemp;
break;
case3:
if(TableName!=undefined&&TableName!=""){
strTemp="DELETEFROM"+TableName;
if(Condition!=undefined){
State=true;
strTemp+="WHERE"+Condition;
}else{
strTemp=getError(1);
}
}else{
strTemp=getError(0);//请求输出表名
}
returnstrTemp;
break;
case4:
if(TableName!=undefined&&TableName!=""){
strTemp="INSERTINTO"+TableName;
if(Fields.length!=0){
State=true;
strTemp</p>只要你想学,就没什么优缺点,上面那位大哥已经把网上的评论说了,但我认为想学哪个都一样,不然它就不可能在当今时代数字艺术方面存活到今天 |
|