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 to retrieve ID when not using URL string

Print topic Send  topic

Author Message
forLoop

Posts: 20
Posted: 11/19/2007, 7:04 AM

Hi all,

I'm a little stumped here and any help would be awesome. On my home page I have a grid that's displaying one result. Below this grid I have a list of user comments but I only want to show comments that go with this certain grid. Basically, I'd like to do is show all comments where bonsai_id=bonsai_id from above grid. Does that make sense?

Thanks in advance,
Robb
View profile  Send private message
DonP
Posted: 11/19/2007, 1:53 PM

Probably the easiest way is to add a second grid below the first one that
gets the needed entries with by using the Query Wizard or by creating a
Before Build Select custom query. You would do this by joining the tables
and grabbing the entries where there is a match between the main page table
and the comments table.

Otherwise you would need to add a label with an event which contains a
custom query and loop to pull them out and list them.

I am presuming that the comments table contains a field for the ID from the
main page table in order to relate them. If not, it would need to be added
before these methods would work.

Don (DonP)

"forLoop" <forLoop@forum.codecharge> wrote in message
news:54741a5e7af2e8@news.codecharge.com...
> Hi all,
>
> I'm a little stumped here and any help would be awesome. On my home page I
> have
> a grid that's displaying one result. Below this grid I have a list of user
> comments but I only want to show comments that go with this certain grid.
> Basically, I'd like to do is show all comments where bonsai_id=bonsai_id
> from
> above grid. Does that make sense?
>
> Thanks in advance,
> Robb
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>

forLoop

Posts: 20
Posted: 11/19/2007, 8:50 PM

Thanks a bunch Don. I'll let you know how it goes..

Robb
View profile  Send private message
forLoop

Posts: 20
Posted: 11/20/2007, 9:00 PM

Howdy,

I'm not quite sure how to Join the tables. I don't know if I explained it that well last night.

Here's basically what I need from the comments grid...

SELECT *
FROM comments
WHERE bonsai_id = bonsai_id from the above grid called bonsai

Does that make it easier? I tried setting a variable from the bonsai grid that I could retrieve but that didn't work.

Thanks for your help and if you EVER need any Flash help, contact me. :)

Robb
View profile  Send private message
forLoop

Posts: 20
Posted: 11/20/2007, 9:39 PM

I got it working! It may have been a hack way to do it but I set a session var and then retrieved it and places it in my query.

Thanks!
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.