or maybe it's me :)
Anyway here is my table
++--+
| RecordID | School |
| PID,AI,INT | Varchar|
++--+
| 108 | Columbia |
+|--+
| 108 | Princeton |
+|--+
| 108
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
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
--- [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
--- 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 the best
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
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 age45)
or die (Invalid query);
I am just wondering that if MySQL server would return all the query
result in total,