ASP.NET中数据库添加的问题
有这么一句SQL语句,看不太懂,还望高手帮帮忙:dimmysqlasstring="insertintopinfor(pname,price,lprice,pkind,p...
有这么一句SQL语句,看不太懂,还望高手帮帮忙:
dim mysql as string=" insert into pinfor(pname,price,lprice,pkind,pimg,pmsg) values ('"+textbox1.text.replace("'","").replace("<","")+"',"+str(int(textbox3.text))+","+str(int(textbox4.text))+",'"+ptlist.selectedvalue+"','"+pimg+"','"+textbox7.text.replace("'","").replace(">","").replace(chr(10),"<br>")+"')"
想请问一下,'"+textbox1.text.replace("'","").replace("<","")+"'这样写是什么意思呢?高手能给个详细的解释吗?
还有在SQL中,什么情况下用双引号"",什么情况下用单双引号'""'呢?
谢谢大家了! 展开
dim mysql as string=" insert into pinfor(pname,price,lprice,pkind,pimg,pmsg) values ('"+textbox1.text.replace("'","").replace("<","")+"',"+str(int(textbox3.text))+","+str(int(textbox4.text))+",'"+ptlist.selectedvalue+"','"+pimg+"','"+textbox7.text.replace("'","").replace(">","").replace(chr(10),"<br>")+"')"
想请问一下,'"+textbox1.text.replace("'","").replace("<","")+"'这样写是什么意思呢?高手能给个详细的解释吗?
还有在SQL中,什么情况下用双引号"",什么情况下用单双引号'""'呢?
谢谢大家了! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询