13 回答
TA贡献1860条经验 获得超9个赞
给你一个例子:
String name;
String sql = "select count(*) from saveurl where projectNAME='" + name + "'";
TA贡献1871条经验 获得超13个赞
@JAVA~~~: 类似下面这种吗
假如你通过URL参数或表单提交的参数名为id,那么可以这样:
<%
Dim Rs,Sql
Set
Rs = Server.CreateObject("ADODB.RecordSet")
Sql = "SELECT * FROM Music_mv WHERE Id = " & CLng(Request("id"))
Rs.Open Sql,Conn,1,1
%>
TA贡献1840条经验 获得超5个赞
@ycyzharry: String sql = "SELECT k.*,case
WHEN u.USERKWORD_ID is null THEN 'false'
ELSE 'true' END AS checked
FROM kwords k LEFT JOIN (SELECT * FROM userkword WHERE USER_ID='8991f4d7782a4ccfb8a65bd96ea7aafa') u ON k.KWORDS_ID=u.KWORDS_ID WHERE k.USERGROUP_ID='288d9590a9a94ef580afb7525fb7244e'";
TA贡献1798条经验 获得超7个赞
@JAVA~~~:
类似这种吧
SELECT * FROM tb_demo083 WHERE code IN(SELECT code FROM tb_demo083 WHERE code BETWEEN '$_POST[text1]' AND '$_POST[text2]')
TA贡献1810条经验 获得超4个赞
int a=5;
String sql="select * from user where id='"+a+"'";
用 '"+a+"'表示字符;
用 "+a+"表示数字;
TA贡献1866条经验 获得超5个赞
int a=5;
String sql="select * from user where id='"+a+"'";
用 '"+a+"'表示字符;
用 "+a+"表示数字;
添加回答
举报