|
WRXSTi -> SQL dB Query ?? (4/5/2002 17:55:43)
|
I have the following code: sql = "SELECT items.id, " & _ "items.subject, " & _ "items.condition, " & _ "items.price, " & _ "items.category, " & _ "items.email, " & _ "items.user, " & _ "items.submit_date, " & _ "items.submit_type " & _ "FROM items " & _ "WHERE ((items.submit_type)='" & sType & "') AND ((items.user)='" & sUser & "');" In my web page I have two text boxes where visitors will fill in for query conditions. sType is a item condition, new, used, etc, and sUser is the users ID. If a user fills in sType, but not sUser no results will be returned. can I force a '*' in for either sType or sUser for a representation of all results returned ? Example: Query only used items and from all users? Is there a character or condition I can inser in the where condition or must I remove it for the query example to return all used items of all users. Me
|
|
|
|