RE: Database search logic question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A couple of possibilities are:

Store search criteria (form entries) in MySQL
Store query string in MySQL

If the user has to log-in then the MySQL table would
be keyed on the user_id or similar.

If the user does not have to log-in then you will most
likely need to store something in a client-side cookie 
that references the saved query details.

On one of my sites I allow users to either build a query
via a step-by-step procedure or manually enter a query
statement. It is the statement that I store in the 
database together with a name they supply and their user 
id. This allows the user to save multiple queries and 
recall them at a later date by a name that they supplied.

HTH
Graham


> -----Original Message-----
> From: Stuart Felenstein [mailto:stuart4m@xxxxxxxxx]
> Sent: 15 November 2004 09:10
> To: php-general@xxxxxxxxxxxxx
> Subject:  Database search logic question
> 
> 
> For those who recognize this topic from me and perhaps
> are sick of it , my apologies :)
> 
> This is actually a different question more about logic
> then syntax or functionality.
> 
> One of the uses of my search form is that users may
> save their search parameters. Typical benefits, they
> don't have to re-enter all the criteria.  Hitting one
> link or receiving an email can get them the results
> they need.  
> 
> The way I was approaching this was to grab the url,
> the part after the ? , so not the referer.  Whatever
> the second part is called. 
> Only now that I've created a search and results page
> via Post method, of course there is nothing going to
> the URL. I'm wondering at this point if I should
> create a way to let users save their search
> parameters, by grabbing the variables and storing them
> as an array in the database or go back to the URL
> method.
> 
> Curious if anyone sees benefits or negatives with
> either.
> 
> Stuart
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux