This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > April 2004 > Show if - HELP!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Show if - HELP!
Wally Kolcz

2004-04-28, 10:30 pm

Is there any way to change this:

<% If Not visa.EOF Or Not visa.BOF Then %>
<img src="../images/icons/visa.gif" width="39"
height="25">
<% End If ' end Not visa.EOF Or NOT visa.BOF %>

To say that if the database table = 1 then show and if database table = 0
then don't?


Daniel Short

2004-04-29, 4:29 am

> <% If Not visa.EOF Or Not visa.BOF Then %>
> <img src="../images/icons/visa.gif" width="39"
> height="25">
> <% End If ' end Not visa.EOF Or NOT visa.BOF %>
>
> To say that if the database table = 1 then show and if database table = 0
> then don't?


Hi Wally, do you mean "if the recordset has only one record show the image?
If so, this should work:

<% If visa.RecordCount = 1 Then %>
<img src="../images/icons/visa.gif" width="39" height="25">
<% End If %>

Hope that helps,


--
:: Dan Short :: Take out the witty remark to reply.
Cartweaver: http://www.cartweaver.com/
Bloggin': http://blog.web-shorts.com/
Get it at da store: http://www.dwfaq.com/store/
Team Macromedia DW Volunteer: http://www.macromedia.com/go/team
Design: http://www.web-shorts.com


Wally Kolcz

2004-04-30, 5:32 pm

Actually I would like it to read that if the field has a 1 in it, show the
icon, if not, don't.


Daniel Short

2004-04-30, 5:32 pm

In that case you need to check the field value:

<% If Not visa.EOF Or Not visa.BOF Then %>
<% If visa("myField") = 1 Then %>
<img src="../images/icons/visa.gif" width="39" height="25">
<% End If %>
<% End If ' end Not visa.EOF Or NOT visa.BOF %>

Dan

"Wally Kolcz" <wkolcz@comcast.net> wrote in message
news:c6u0k6$8ms$1@forums.macromedia.com...
> Actually I would like it to read that if the field has a 1 in it, show the
> icon, if not, don't.
>
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews