Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Search for field in related table
Re: Search for field in related table [message #1788 is a reply to message #676] Wed, 05 November 2008 03:23 Go to previous messageGo to previous message
rhogan is currently offline  rhogan
Messages: 4
Registered: November 2008
Location: Wolfeboro, NH
Junior Member
AJM wrote on Tue, 13 March 2007 13:20

The contents of $where ($sql_where) is filtered to remove any columns which do not exist in the current table. If you are joining to other tables then search criteria for these other tables can be placed inside $this->sql_search using code inside the _cm_pre_getData() method. The contents of $this->sql_search has a different filter mechanism.



Could you provide a specific example of this? What code goes in which file?

For instance, I've got 2 tables with a one-to-many relationship, one person to many phone numbers.

I'd like to add phone number to the search screen for person in a drop down. So the user who has a phone number can find out what person it belongs to. In other words, I want to do a search on the senior table, based on a value in the junior table, and I need to have that field appear for input on the senior table search screen.

This seems like it should be simple, but I've been working through the tutorial for at least a week and I just can't find the solution. I can't have a user pick the person before getting to phone, because, that's what they would be searching for.

Thanks,
Boz

[Updated on: Wed, 05 November 2008 03:27]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Use a popup from a navigation button
Next Topic: Dynamic Report Column Headings
Goto Forum:
  


Current Time: Fri Nov 29 12:29:56 EST 2024

Total time taken to generate the page: 0.01095 seconds