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

Home » Imported messages » comp.lang.php » Filter on recordset and only return those recods
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Filter on recordset and only return those recods [message #175841] Sun, 30 October 2011 03:02 Go to next message
chrisdavis is currently offline  chrisdavis
Messages: 2
Registered: October 2011
Karma: 0
Junior Member
What I have is a page basically called "search.php". It has a dynamic
dropdown of names in the database. I am passing the ID param to
another search page called "search1.php". On that page is a recordset
and dynamic table with a master-detail page set. I have also added an
extension by Tom Muck's dynamic search suite extension. At first I
couldn't get it to filter right but it seems to now after playing with
the code. I just added a $POST[search] to the WHERE statement.

What I CAN'T figure out is once the page is filtered, how do I set the
search params to ONLY search for those that are already filtered?

In other words, company = 1 search results company 1, company 1, etc.
When I use the search extension and type in "TEST" it's bringing up
company 1, company 2, company 3, etc.

I can paste code of that will help. I can read code but not really
write it.

Thanks to all!
Re: Filter on recordset and only return those recods [message #175843 is a reply to message #175841] Sun, 30 October 2011 12:52 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 10/29/2011 11:02 PM, chrisdavis wrote:
> What I have is a page basically called "search.php". It has a dynamic
> dropdown of names in the database. I am passing the ID param to
> another search page called "search1.php". On that page is a recordset
> and dynamic table with a master-detail page set. I have also added an
> extension by Tom Muck's dynamic search suite extension. At first I
> couldn't get it to filter right but it seems to now after playing with
> the code. I just added a $POST[search] to the WHERE statement.
>
> What I CAN'T figure out is once the page is filtered, how do I set the
> search params to ONLY search for those that are already filtered?
>
> In other words, company = 1 search results company 1, company 1, etc.
> When I use the search extension and type in "TEST" it's bringing up
> company 1, company 2, company 3, etc.
>
> I can paste code of that will help. I can read code but not really
> write it.
>
> Thanks to all!

You need to keep track of previous search parameters and include them in
your new search.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Filter on recordset and only return those recods [message #175849 is a reply to message #175843] Mon, 31 October 2011 00:52 Go to previous messageGo to next message
chrisdavis is currently offline  chrisdavis
Messages: 2
Registered: October 2011
Karma: 0
Junior Member
On Oct 30, 7:52 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 10/29/2011 11:02 PM, chrisdavis wrote:
>
>
>
>> What I have is a page basically called "search.php".  It has a dynamic
>> dropdown of names in the database.  I am passing the ID param to
>> another search page called "search1.php".  On that page is a recordset
>> and dynamic table with a master-detail page set.  I have also added an
>> extension by Tom Muck's dynamic search suite extension.  At first I
>> couldn't get it to filter right but it seems to now after playing with
>> the code.  I just added a $POST[search] to the WHERE statement.
>
>> What I CAN'T figure out is once the page is filtered, how do I set the
>> search params to ONLY search for those that are already filtered?
>
>> In other words, company = 1 search results company 1, company 1, etc.
>> When I use the search extension and type in "TEST" it's bringing up
>> company 1, company 2, company 3, etc.
>
>> I can paste code of that will help.  I can read code but not really
>> write it.
>
>> Thanks to all!
>
> You need to keep track of previous search parameters and include them in
> your new search.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

HI Jerry. That's a good idea but I'm not sure how to do it. Have any
code suggestions?
Re: Filter on recordset and only return those recods [message #175850 is a reply to message #175849] Mon, 31 October 2011 02:22 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 10/30/2011 8:52 PM, chrisdavis wrote:
> On Oct 30, 7:52 am, Jerry Stuckle<jstuck...@attglobal.net> wrote:
>> On 10/29/2011 11:02 PM, chrisdavis wrote:
>>
>>
>>
>>> What I have is a page basically called "search.php". It has a dynamic
>>> dropdown of names in the database. I am passing the ID param to
>>> another search page called "search1.php". On that page is a recordset
>>> and dynamic table with a master-detail page set. I have also added an
>>> extension by Tom Muck's dynamic search suite extension. At first I
>>> couldn't get it to filter right but it seems to now after playing with
>>> the code. I just added a $POST[search] to the WHERE statement.
>>
>>> What I CAN'T figure out is once the page is filtered, how do I set the
>>> search params to ONLY search for those that are already filtered?
>>
>>> In other words, company = 1 search results company 1, company 1, etc.
>>> When I use the search extension and type in "TEST" it's bringing up
>>> company 1, company 2, company 3, etc.
>>
>>> I can paste code of that will help. I can read code but not really
>>> write it.
>>
>>> Thanks to all!
>>
>> You need to keep track of previous search parameters and include them in
>> your new search.
>>
>
> HI Jerry. That's a good idea but I'm not sure how to do it. Have any
> code suggestions?

How do you keep track of any values between pages? You do this the same
way. It can be in the session, cookies, hidden fields... lots of ways.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Suche Buch zur OOA/OOD
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 07:03:19 GMT 2024

Total time taken to generate the page: 0.02595 seconds