Re: search() without search criteria

[prev] [thread] [next] [Date index for 2005/04/29]

From: Peter Speltz
Subject: Re: search() without search criteria
Date: 19:11 on 29 Apr 2005
--- Tony Bowden <tony-cdbitalk@xxxxx.xxx> wrote:
> On Fri, Apr 29, 2005 at 05:53:00PM +0100, Will Hawes wrote:
> > A patch to search() (or rather, _do_search()) would be a better
> > solution. The ability to pass an empty hash to search() is logical and
> 
> Why? 
> 
> Surely a search with no search criteria is no longer a search?
> 

I think it is a search. In SQL  what is a "search" ?  Is it a SELECT  plus a  a
WHERE clause?  Does a search without any criteria give back 0 rows, all rows,
or die of SQL syntax error? Often users get a listing when they search with no
criteria.   Maypole's default search page  does a retrieve all if no criteria
and a search_where if there is criteria.  I think this makes sense from a
user's point of view as they may not know any criteria until they see a
listing. 

Programattically what Will suggests can make coding easier. I think search
funciton without any criteria should do a "Select __ESSENTIAL__ from __TABLE";


pjs

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

(message missing)

search() without search criteria
Will Hawes 12:36 on 29 Apr 2005

Re: search() without search criteria
Matt S Trout 13:18 on 29 Apr 2005

Re: search() without search criteria
Daniel Wijnands 14:06 on 29 Apr 2005

Re: search() without search criteria
Perrin Harkins 14:25 on 29 Apr 2005

Re: search() without search criteria
Will Hawes 16:53 on 29 Apr 2005

Re: search() without search criteria
Tony Bowden 18:38 on 29 Apr 2005

Re: search() without search criteria
Matt S Trout 19:38 on 29 Apr 2005

Re: search() without search criteria
Will Hawes 20:19 on 29 Apr 2005

Re: search() without search criteria
Tony Bowden 22:48 on 29 Apr 2005

Re: search() without search criteria
Perrin Harkins 16:40 on 30 Apr 2005

Re: search() without search criteria
David Baird 14:31 on 29 Apr 2005

Re: search() without search criteria
Peter Speltz 19:11 on 29 Apr 2005

Re: search() without search criteria
Tony Bowden 22:52 on 29 Apr 2005

Re: search() without search criteria
Will Hawes 12:13 on 30 Apr 2005

Re: search() without search criteria
Tony Bowden 12:19 on 30 Apr 2005

Re: search() without search criteria
merlyn (Randal L. Schwartz) 15:44 on 30 Apr 2005

Re: search() without search criteria
Will Hawes 17:45 on 30 Apr 2005

Re: search() without search criteria
Tony Bowden 10:27 on 01 May 2005

Re: search() without search criteria
Will Hawes 14:13 on 01 May 2005

Generated at 10:24 on 04 May 2005 by mariachi v0.52