<% vpn = request("familia") MySQL_STRING="Driver={MySQL ODBC 5.1 Driver};Server=robb0501.publiccloud.com.br;Port=3306;Database=OKEY_produtos;User=OKEY_usuario; Password=#okbd2017#;Option=3;" set OBJdbConnection = Server.CreateObject("ADODB.Connection") set rs= Server.CreateObject("ADODB.Recordset") ' NOBREAKS OBJdbConnection.Open MySQL_STRING rs.ActiveConnection = OBJdbConnection if vpn = "PRODUTOS" then SQL = "SELECT DISTINCT FAMILIA,TIPO FROM tabela_preco ORDER BY TIPO ASC" else SQL = "SELECT DISTINCT FAMILIA,TIPO FROM tabela_preco WHERE FAMILIA ='" & vpn & "' ORDER BY TIPO ASC" end if Set rs=OBJdbConnection.Execute(SQL) if rs.eof then Response.Redirect "http://okey.com.br" end if %>
>
<% = vpn %>
      <% rs.movefirst %> <% do while not rs.eof %> <% vtx = rs("TIPO") %>
    • <% = mid(vtx,1,80) %>
    • <% rs.movenext %> <% loop %>
<% OBJdbConnection.close %>