CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 How can I filter or condition a database link?

Print topic Send  topic

Author Message
joejac

Posts: 242
Posted: 10/09/2007, 10:06 AM

Hello,
1.- I have a table for page links with 2 fields:
page_no and page_name
page_no=1 => page_name= No Page
page_no=X => page_name= pageX.php

2.- I have a title field from articles table that has a link that goes to the corresponding page_name for the article. Now the link goes to page_name very well except when page_no=1 ("No Page")

3. Question: How can I filter or condition the link so:

If page_no=1 It do not place the hyperlink on the title because there is no page, and allow the link if page_no= is different than "1", because it will have a page to go.

If requires php code on an event I would appreciated if the code can be provided.

Thanks a lot
joejac
View profile  Send private message
aondecker

Posts: 58
Posted: 10/11/2007, 6:47 AM

I would place both a link and an label in the title field and set the link visible property to "Dynamic".

Then in your before show code put

if (page_no ==1)
{
link->show = false;
label1->setvalue("PAGE 1") (or whatever you want it to say)
}
else
{
link->show = true;
link->setlink(destinationpage.php)
link->settext("LInk text")
label1->setvalue = "";
}
View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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