I've always been confused when writing sql withing the ASP syntax parameters. Can someone help me with this statement?
choice = request("choice")
P_Status = request("P_Status)
sql = "select * from Projects "
sql = sql & "where ( title like & choice ) & "
sql = sql & "and (P_Status = "complete") "
sql = sql & "order by Title ASC"
set rs = connection.execute(sql)
P_Status is one of the fields in my database as well as title. Choice is the variable in my Select case statement. My user chooses a letter via a radio button then the select statement processes it and my sql statement is supposed to get all the Titles that begin with that letter from the db. I'd appreciate any help I can get. Thanks!
choice = request("choice")
P_Status = request("P_Status)
sql = "select * from Projects "
sql = sql & "where ( title like & choice ) & "
sql = sql & "and (P_Status = "complete") "
sql = sql & "order by Title ASC"
set rs = connection.execute(sql)
P_Status is one of the fields in my database as well as title. Choice is the variable in my Select case statement. My user chooses a letter via a radio button then the select statement processes it and my sql statement is supposed to get all the Titles that begin with that letter from the db. I'd appreciate any help I can get. Thanks!