Forums
This topic is locked
Two filters same row
Posted 13 Mar 2007 14:21:09
1
has voted
13 Mar 2007 14:21:09 Sérgio Coelho posted:
I'm trying to make a result page where I say that "emb=070, 071". I do this by passing from another page in GET mode the "emb" var. When I go to my result page I expect to see only the results that correspond to the criteria "emb". I pass the "emb=070, 071', anda the result should be the tow results that correspond to the "emb" var. If I pass only one var ("emb=070" it shows the one record, but with tow or more filters like 070, 071 the record shows empty.Where's the code:
<%
Dim adicionar_embalagens__embalagem
adicionar_embalagens__embalagem = "1"
If (Request.QueryString("emb" <> "" Then
adicionar_embalagens__embalagem = Request.QueryString("emb"
End If
%>
<%
Dim adicionar_embalagens
Dim adicionar_embalagens_numRows
Set adicionar_embalagens = Server.CreateObject("ADODB.Recordset"
adicionar_embalagens.ActiveConnection = MM_mysql_STRING
adicionar_embalagens.Source = "SELECT * FROM embalagens WHERE cod LIKE '%" + Replace(adicionar_embalagens__embalagem, "'", "''" + "%'"
adicionar_embalagens.CursorType = 0
adicionar_embalagens.CursorLocation = 2
adicionar_embalagens.LockType = 1
adicionar_embalagens.Open()
adicionar_embalagens_numRows = 0
%>