Re: Weird query behaviour

2004-12-01 Thread Stuart Felenstein
--- Roger Baklund <[EMAIL PROTECTED]> wrote: > The WHERE clause describes EACH of the rows you get > in the result. No > one row can have a value in the School column equal > to "Columbia" AND > "Stamford" at the same time. You should use OR > instead of AND. > Thank you Roger. That is one of

Re: Weird query behaviour

2004-12-01 Thread Stuart Felenstein
--- [EMAIL PROTECTED] wrote: > There is nothing weird about that behavior. You > asked for all of the rows > where the School column has both of two different > values at the same time. I thought joins were difficult to comprehend ;) > Try an OR instead or use the IN() operator. > > WHERE Sc

Re: Weird query behaviour

2004-12-01 Thread SGreen
There is nothing weird about that behavior. You asked for all of the rows where the School column has both of two different values at the same time. >> WHERE School='Columbia' and School='Stamford' if School is 'Columbia' the first part is true but the second part can't be and vice versa. Your

Re: Weird query behaviour

2004-12-01 Thread Roger Baklund
Stuart Felenstein wrote: [...] But if in the where statment I add: where School = Columbia and School = Stamford Nothing is returned The WHERE clause describes EACH of the rows you get in the result. No one row can have a value in the School column equal to "Columbia" AND "Stamford" at the same

Weird query behaviour

2004-12-01 Thread Stuart Felenstein
or maybe it's me :) Anyway here is my table ++--+ | RecordID | School | | PID,AI,INT | Varchar| ++--+ | 108 | Columbia | +|--+ | 108 | Princeton | +|--+ | 108

odd query behaviour

2002-09-06 Thread Mike Dickerson
Please forgive me if this has been addressed (please refer me to the docs and I will rtfm) or if I'm just being a bobo. I am running a 3.23.39 client/server on FreeBSD 4.6S system. I am getting a very peculiar query behavior. I have a cgi program using the Perl DBI. The programin in question

Query Behaviour

2002-01-07 Thread Alex Shi
My situation is to access a remote MySQL server, and of course I do care about traffic. Suppose In a script there's a query: $result = mysql_query ("select * from employ where age>45") or die ("Invalid query"); I am just wondering that if MySQL server would return all the query result in tot