• 0
Sign in to follow this  

Nao Mostrar O Mesmo Valor 2 Vezes


tipw...vamos supor que na tabela "fotos" tenha o campo "subcat"...

na hora de incluir vai ter um list/menu para selecionar as subcats cadastradas...

e nessa se for fazer do jeito normal...se tiver 2 campos com a subcat chamada "teste" vai aparecer 2 vezes...e eu keria que aparecece uma vez só...entenderam?

o codigo atual é:

 <SELECT name="subcat_list" class=botao_enviar id="subcat_list" df_verificar="sim">
                                  <OPTION value=""></OPTION>
  Set objRS3 = Server.CreateObject("ADODB.Recordset")
  objRS3.CursorLocation = 3
  objRS3.CursorType = 3
  objRS3.LockType = 1
  strQ = "SELECT * FROM fotos"
  objRS3.Open strQ, objCon, , , &H0001
  If Not objRS3.EOF Then
    While Not objRS3.EOF
   If Trim(objRS3.Fields.Item("subcat").Value) <> "" Then
     Response.Write "      <OPTION value='" & (objRS3.Fields.Item("subcat").Value) & "'>" & (objRS3.Fields.Item("subcat").Value) & "</OPTION>"
   End If
  End If 
  set objrs3 = nothing

agradeco desde já=]

Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this