CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 How to look for "address from database" on a secondary table?

Print topic Send  topic

Author Message
joejac

Posts: 242
Posted: 09/26/2007, 9:11 AM

Hello,

I have a menu whose links are: "Href type": Database, "text from database" is menu_name, which is the name of the menu item of menu table, and "address from database" is page_no where page_no is also the key of the page table. This "page" table has the real page_name for the link of the corresponding menu item.

I have not found how to tell the menu form (a grid form) that has to go to the page table and look for the corresponding page_name field of page_no and use it as "address from database" instead of page_no.

Can somebody explain please how to accomplish this in an easy way if possible. If it needs actions or code on an event, can provide such code? (PHP, MySQL)

Thanks a lot in advance
joejac
View profile  Send private message
wkempees


Posts: 1679
Posted: 09/26/2007, 9:44 AM

The sql for your grid can be altered to JOIN the other table.
After which all (selected) fieds are directly available.

in the properties of your grid press ... dataSurce to go to VisualQueryBuilder.
Add the pagename table and indicate join.
Select the extra field and press ok.
In the grid field should now bevailable.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
joejac

Posts: 242
Posted: 10/10/2007, 7:55 AM

Thanks a lot! wkempees how easy was your solution, there is a lot of things to learn with CCS3.

One more question on the issue, please:

1.- For the page table I have:

page_no=1 => page_name= No Page
page_no=X => page_name= pageX.php

X is any integer greater than 1.

2.- I have a title field from an articles table grid that has a link that goes to the corresponding page_name for the article. With your solution the link goes to page_name very well except when page_no=1 ("No Page") because it needs a well written IF somewhere, obviously.

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 to go, and allow the link if page_no= is different than "1", because it will have a page to go.

I read a lot but I could not figured out how to do this.

If requires little php code on an event, I would appreciated if the code can be provided. If there is documentation easy to understand on how to do this please let me know, because I was not able to find on CCS3 documentation data that I can successfully apply.

Sorry but I am not an experienced programmer.

Thanks a lot
joejac
View profile  Send private message
wkempees


Posts: 1679
Posted: 10/11/2007, 10:28 AM

Publish your SQL statement here.
I will then give you solution.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
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.

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.