id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select table1.titel,table1.content,table2.hf from table1 where ( table1.id=(select table2.tid from table2 where tid="&id&"))"
rs.open sql,conn,1,3
rs("title")=request("title") /*表一*/
rs("hf")=request("hf") /*表二*/
rs.update
rs.close
运行结果,,,,,,,,,,参数不足,期待是 2
大家看注表一表二.那样用update能行吗?
请大家帮忙.谢谢
參考答案:把
sql=\"select table1.titel,table1.content,table2.hf from table1 where ( table1.id=(select table2.tid from table2 where tid=\"&id&\"))\"
改成
sql=\"select a.id,a.title,a.content,a.hf,b.id from table1_name a table2_name b where a.id=b.id\"
这样的话两张表都被打开了!
然后试一下
to 楼主
我也提了个问题!就是想学参数的具体情况!哈哈~~比较菜!
那你参数都试过了吗?
2,2