--=====================_22495697==_.ALT
Content-Type: text/plain; charset="us-ascii"
You could do it all in SQL. (forgive my not-quite valid SQL syntax below but the idea
is valid)
In the original search, save your resultset (just the IDs) in a temporary table.
select into searchresults ID, #UserID# where x,y,z
Use that temp table to display your results.
select ID from searchresults where UserID = #userID#
or select a,b,c from InfoTable where ID in (select ID from searchresults where
UserID = #UserID#)
If the user wants to narrow the search, just restrict the search to the IDs in the
resultset:
select ID from InfoTable where x,y,z AND ID in (select ID from searchresults
where UserID = #UserID#)
You could allow the user to successively narrow the search by saving each resultset
(an exercise for the reader :-) )
At 03:57 AM 8/5/00 +0800, CT, Loo wrote:
>Dear all gurus,
>
>Please help!!!
>I have a scenerio here:
>I am developing a page to provide user for searching capability. Initially,
>user will enter a broader search criteria and in the coding I name the query
>as "getresult" and it return a recordset of 500 records out from the
>database. The result is displayed to user. Now, I would like to allow the
>user to narrow down the search with more detail criteria. How can I prevent
>the system to repeat the search through the whole database again? Instead I
>would like to search WITHIN these 500 records found earlier. Is there anyway
>to reuse the recordset? Please advise.
>
>Thank you.
>
>Kind regards,
>loo
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032
--=====================_22495697==_.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<font size=3>You could do it all in SQL. (forgive my not-quite valid SQL
syntax below but the idea is valid)<br>
<br>
In the original search, save your resultset (just the IDs) in a temporary
table.<br>
<br>
<x-tab> </x-tab>select
into searchresults ID, #UserID# where x,y,z<br>
<br>
Use that temp table to display your results.<br>
<br>
<x-tab> </x-tab>select ID
from searchresults where UserID = #userID#<br>
or<x-tab> </x-tab>select a,b,c from
InfoTable where ID in (select ID from searchresults where UserID =
#UserID#)<br>
<br>
If the user wants to narrow the search, just restrict the search to the
IDs in the resultset:<br>
<br>
<x-tab> </x-tab>select ID
from InfoTable where x,y,z AND ID in (select ID from searchresults where
UserID = #UserID#)<br>
<br>
You could allow the user to successively narrow the search by saving each
resultset (an exercise for the reader :-) )<br>
<br>
<br>
At 03:57 AM 8/5/00 +0800, CT, Loo wrote:<br>
<blockquote type=cite cite>Dear all gurus,<br>
<br>
Please help!!!<br>
I have a scenerio here:<br>
I am developing a page to provide user for searching capability.
Initially,<br>
user will enter a broader search criteria and in the coding I name the
query<br>
as "getresult" and it return a recordset of 500 records out
from the<br>
database. The result is displayed to user. Now, I would like to
allow the<br>
user to narrow down the search with more detail criteria. How can I
prevent<br>
the system to repeat the search through the whole database again? Instead
I<br>
would like to search WITHIN these 500 records found earlier. Is there
anyway<br>
to reuse the recordset? Please advise.<br>
<br>
Thank you.<br>
<br>
Kind regards,<br>
loo<br>
<br>
------------------------------------------------------------------------------<br>
Archives:
<a href="http://www.mail-archive.com/[email protected]/"
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
To Unsubscribe visit
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</a>
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
</font></blockquote><br>
<font size=2><b><br>
---------------------------------------------------------------------------<br>
Peter Theobald, </b>Chief Technology Officer<br>
</font><font size=3 color="#0000FF"><b>LiquidStreaming </b></font><a
href="http://www.liquidstreaming.com/" eudora="autourl"><font size=2
color="#0000FF"><u>http://www.liquidstreaming.com</a><br>
</u></font><font size=2>[EMAIL PROTECTED]<br>
<b>Phone</b> 1.212.545.1232 <b>Fax</b> 1.212.679.8032<br>
</font></html>
--=====================_22495697==_.ALT--
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.