Re: [GENERAL] Question - Query based on WHERE OR

2007-01-12 Thread Ragnar
On miĆ°, 2007-01-10 at 17:38 -0800, Mike Poe wrote: > I'm a rank newbie to Postgres & am having a hard time getting my arms > around this. > > I'm trying to construct a query to be run in a PHP script. I have an > HTML form were someone can enter either a last name or a social > security number &

Re: [GENERAL] Question - Query based on WHERE OR

2007-01-11 Thread SCassidy
="SELECT foo, baz, bar FROM public.table WHERE $where"; Then, run the query. Just a couple of ideas. Susan Cassidy "Mike Poe" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 01/10/2007 05:38 PM To pgsql-general@postgresql.org cc Subject [GENERAL] Question - Query based

Re: [GENERAL] Question - Query based on WHERE OR

2007-01-11 Thread John D. Burger
Mike Poe wrote: SELECT foo, baz, bar FROM public.table WHERE lastname ~* '$lastname' OR ssn='$ssn'" I need to leave the last name a wildcard in case someone enters a partial name, lower case / upper case, etc. I want the SSN to match exactly if they search by that. The way it's written, if

[GENERAL] Question - Query based on WHERE OR

2007-01-11 Thread Mike Poe
I'm a rank newbie to Postgres & am having a hard time getting my arms around this. I'm trying to construct a query to be run in a PHP script. I have an HTML form were someone can enter either a last name or a social security number & then query the database based on what they entered. My query l