Gossamer Forum
Home : Products : DBMan SQL : Discussion :

If ne '' problem

Quote Reply
If ne '' problem
hi,

I have a database with a field ImageURL (varchar255).

what I'm trying to do is to display a text if there is no url stored in this field:




<%loop results%>

<%if ImageURL ne ''%>

<A HREF="<%ProduktURL%>" TARGET="_blank"><img src="<%ImageURL%>" WIDTH="60" HEIGHT="60" BORDER="0"></A>

<%else%>

<FONT SIZE="1">No Picture</FONT>

<%endif%>

<%endloop%>





My problem is that I even get an empty IMG-tag (IMG SRC="") when there is no ImageURL instead of the "No Picture"-text.

What am I doing wrong?????

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] If ne '' problem In reply to
Try
Code:
<%if ImageURL%>
instead of
Code:
<%if ImageURL ne ''%>
to test there it contains a value.

Good luck, Jasper

http://www.bookings.org