<% Query = "SELECT distinct(p.id_prod) as id_prod, p.status as status, p.estoque as estoque, m.id_marca as id_marca, c.id_categ as id_categ, f.id_foto as id_foto, p.titulo as titulo, c.descricao as categoria, pr.v_normal as v_normal, pr.v_desconto as v_desconto FROM marca as m, categoria as c, produto as p, foto as f, preco as pr WHERE m.id_marca = c.id_marca and c.id_categ = p.id_categ and p.id_prod = f.id_prod and pr.id_prod = p.id_prod group by p.id_prod order by p.status desc, p.id_prod desc, f.id_foto asc LIMIT 0,4" Set rsData = Connect.Execute(Query) while not rsData.EOF %> <% wend %>
<% if not rsData.EOF then %>
.jpg" border="0"/> <%=rsData("titulo")%>
<%=rsData("categoria")%>

<% if rsData("status") = 1 and rsData("estoque") > 0 then if rsData("v_desconto") <> "" then %> De: R$ <%=formatnumber(rsData("v_normal"),2)%>
Por: R$ <%=formatnumber(rsData("v_desconto"),2)%>
<% else %> Por: R$ <%=formatnumber(rsData("v_normal"),2)%> <% end if %>

&id_marca=<%=rsData("id_marca")%>&id_prod=<%=rsData("id_prod")%>"> &id_marca=<%=rsData("id_marca")%>&id_prod=<%=rsData("id_prod")%>"> <%else%> Produto indisponível <%end if%>
<% rsData.MOVENEXT else response.write " " end if %>
<% if not rsData.EOF then %>
.jpg" border="0"/> <%=rsData("titulo")%>
<%=rsData("categoria")%>

<% if rsData("status") = 1 and rsData("estoque") > 0 then if rsData("v_desconto") <> "" then %> De: R$ <%=formatnumber(rsData("v_normal"),2)%>
Por: R$ <%=formatnumber(rsData("v_desconto"),2)%>
<% else %> Por: R$ <%=formatnumber(rsData("v_normal"),2)%> <% end if %>

&id_marca=<%=rsData("id_marca")%>&id_prod=<%=rsData("id_prod")%>"> &id_marca=<%=rsData("id_marca")%>&id_prod=<%=rsData("id_prod")%>"> <%else%> Produto indisponível <%end if%>
<% rsData.MOVENEXT else response.write " " end if %>