hughesmi
05-21-2006, 10:53 PM
strSQL = "SELECT * " _
& "FROM tblNews " _
& "WHERE Short_news LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "OR News_Item LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "WHERE PersonID =" & Session("PersonID")
Could someone please help with the logic of this? I know I can not have two WHERE clauses. I just need the statment to only show the searches from the two tables where the "allowed" user can ONLY see there results. Hence the "WHERE PersonID =" & Session("PersonID").
& "FROM tblNews " _
& "WHERE Short_news LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "OR News_Item LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "WHERE PersonID =" & Session("PersonID")
Could someone please help with the logic of this? I know I can not have two WHERE clauses. I just need the statment to only show the searches from the two tables where the "allowed" user can ONLY see there results. Hence the "WHERE PersonID =" & Session("PersonID").