eswar rao

eswar rao

  • 1.5k
  • 97
  • 18.2k

how to write a query for get the data by particular user

Nov 25 2015 7:44 AM
hi this is eswar..i am developing a website but one problem was faced ..that is i have to get the data from sqlserver by using queary.. i want data from two tables that whos posted the data ..my queary is
 
 
 "SELECT n.newsid, n.state, n.district, n.region, n.views, n.currentplace, n.newstitle, n.description, n.poston, n.postby, (SELECT TOP 1 imagepath FROM tbl_userpost_newsimages ni WHERE nipostby='"+lbl_upname.Text+"' and n.newsid=ni.newsid) AS imagepath FROM tbl_userpost_news n Order By n.poston desc"
 
please help me 

Answers (1)