• 0
Sign in to follow this  
ju_rezende

Erro No If

Question

Olá pessoal estou tentando fazer um elseif mas não esta dando certo esta dando erro de sintaxe, Será que alguém poderia me ajudar?

Vou por meu codigo aqui...

dim sql

if request.form("bairro")<>"Bairro" then

sql=" And  Bairro = '" & request.form("Bairro") & "'"

elseif

request.form ("Categoria")<> "Categoria" then

sql=" And Categoria = '" & request.form("Categoria") & "'" & sql

elseif

request.form ("Empresa") <> "" then

sql=" And Empresa like '%" & trim(request.form("Empresa")) & "%'" & sql

'like '" & busca1 & "%' and del=0"

response.write "Nehum registro encontrado"

response.end

end if

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Ok

<%dim sql

if request.form("bairro")<>"Bairro" then

sql=" And  Bairro = '" & request.form("Bairro") & "'"

elseif  request.form ("Categoria")<> "Categoria" then

sql=" And Categoria = '" & request.form("Categoria") & "'" & sql

elseif  request.form ("Empresa") <> "" then

sql=" And Empresa like '%" & trim(request.form("Empresa")) & "%'" & sql

else

response.write "Nehum registro encontrado"

response.end

end if%>

Deu para entender?

brigada Abraços

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
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