CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Display link only when value is not null nor empty?

Print topic Send  topic

Author Message
Miguel Barrientos
Posted: 04/23/2003, 8:00 AM

I would like some database driven text to be a link only when a related
database field is not null or empty. I've looked everywhere and haven't
found a way to do it. Would someone be kind enough to tell me how to do it?

Thanks,

Miguel

P.S. I'm using CCS 1.0

DonB
Posted: 04/23/2003, 8:23 PM

The answer depends on the language (asp, php or ?) and the database (MS SQL,
mySQL, or ?)

I normally use MS SQL Server and I would drive the form from a view instead
of the table itself. I would use a CASE that selects on the null/nonnull
column and returns the desired URL or an empty string. Do it on the server
side and the form does not require code to check for a null to alter the
link control's value. Other databases may not implement the CASE and so
you'd have to write code in the before-show event to produce the same
result.

DonB


"Miguel Barrientos" <com@hotmail.miguel3000> wrote in message
news:b869r8$pld$1@news.codecharge.com...
> I would like some database driven text to be a link only when a related
> database field is not null or empty. I've looked everywhere and haven't
> found a way to do it. Would someone be kind enough to tell me how to do
it?
>
> Thanks,
>
> Miguel
>
> P.S. I'm using CCS 1.0
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.