请教在where子语句中的session该怎么写?
想在用户登录后显示该用户所有的文章,不知道where子语句中的session该怎么写,求助,谢谢!
------解决方案--------------------string sql= " ";
sql= "select * from [usertable] where [username]= ' "+session( "username ")+ " ' ";
.......
------解决方案--------------------string sql= " ";
sql= "select * from [usertable] where [username]= ' "+session[ "username "]+ " ' ";
.......
------解决方案--------------------SelectCommand= "SELECT * FROM [articles] WHERE ([username] = <%$ session[ "username "].ToString() %> ) "
------解决方案--------------------为什么要用
SqlDataSource呢?
多别扭啊
整个外观加个连接怎么了?
晕