ASP select/where query

PAz

PAz

Soldato
Joined
18 Oct 2002
Posts
6,566
Location
Beds
Hi, need a little help with my ASP sql query...

I'm still a beginner with this sort of thing despite using it for years :rolleyes:, and cant get this to work.

My news system uses a session based login, and I want users to only be able to edit news that theyve posted...

Ive been trying to work out the select from where query but cant seem to get it to work, anyone got any ideas?

What I've got so far is below..

Code:
sqltemp = "SELECT * FROM tblNews WHERE tblNews.newsAuthor = '& (Session("Username")) &' ORDER BY newsID ASC"

Any help appreciated, thanks.
 
you were close, just forgot the "s...

sqltemp = "SELECT * FROM tblNews WHERE tblNews.newsAuthor = '" & session("Username") & "' ORDER BY newsID ASC"
 
Back
Top Bottom