sql左连接怎么加条件、、、
publicDataSetGetUserBorrowBackBook1(stringtbName){return(data.RunProcReturn("selectre...
public DataSet GetUserBorrowBackBook1(string tbName)
{
return (data.RunProcReturn("select record.*,carinformation.brand,memberinformation.name as name from record " +
" left join carinformation on record.carid=carinformation.carid " +
" left join memberinformation on record.id=memberinformation.id", tbName));
}
左连接没错可以显示 我想选择record表里的id = Session["id"].ToString() 请问要怎么改? 展开
{
return (data.RunProcReturn("select record.*,carinformation.brand,memberinformation.name as name from record " +
" left join carinformation on record.carid=carinformation.carid " +
" left join memberinformation on record.id=memberinformation.id", tbName));
}
左连接没错可以显示 我想选择record表里的id = Session["id"].ToString() 请问要怎么改? 展开
4个回答
展开全部
public DataSet GetUserBorrowBackBook1(string tbName) { return (data.RunProcReturn("select record.*,carinformation.brand,memberinformation.name as name from record " + " left join carinformation on record.carid=carinformation.carid " + " left join memberinformation on record.id=memberinformation.id " +
" where record.id='"+ Session["id"].ToString()+"'", tbName)); }
" where record.id='"+ Session["id"].ToString()+"'", tbName)); }
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-12-29
展开全部
public DataSet GetUserBorrowBackBook1(string tbName) { return (data.RunProcReturn("select record.*,carinformation.brand,memberinformation.name as name from record " + " left join carinformation on record.carid=carinformation.carid " + " left join memberinformation on record.id=memberinformation.id
where record.id = Session["id"].ToString()
", tbName));
}
where record.id = Session["id"].ToString()
", tbName));
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在最后面加个where子句就可以
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询