Hi

What happens if you use 

search_users.Age between 30 and 40

search_users.Age between 35 and 35

search_users.Age = 35

I would be interested in know these results before speculating and answer.

Simon

On Thursday 29 March 2001 03:05, you wrote:
> I am having problems with a MySQL query.  I use the following query:
>
> SELECT search_users.ID FROM search_users,users WHERE search_users.Step=4
> AND users.ID=search_users.ID AND search_users.Login<>'' AND
> search_users.LookForSex="M" AND search_users.Sex="F"  AND
> search_users.Country="US" AND search_users.State="CA" AND (
> search_users.Age>=30  AND  search_users.Age<=40 )  ORDER BY
> search_users.Age
>
> and I get 36 rows returned for an age range of  >=30 and <=40
> but if I use this query:
>
> SELECT search_users.ID FROM search_users,users WHERE search_users.Step=4
> AND users.ID=search_users.ID AND search_users.Login<>'' AND
> search_users.LookForSex="M" AND search_users.Sex="F"  AND
> search_users.Country="US" AND search_users.State="CA" AND (
> search_users.Age>=35  AND  search_users.Age<=35 )  ORDER BY
> search_users.Age
>
> and I get 45 rows returned for an age range of  >=35 and <=35 !!!!!
>
> The queries are exactly the same except for the age ranges!!!  But it is
> giving me inaccurate results.
>
> Any light that you can shine on this matter will be helpful,
> Thanks,
> Jonathan Almarez

-- 
Simon Windsor

CricInfo http://www.cricinfo.com/
Tel: +44 (0) 1249 700744
Fax: +44 (0) 1249 700725
Email: mailto:[EMAIL PROTECTED]

This email message is for the sole use of the intended recipient(s) and may contain
confidential and privileged information.  Any unauthorized review, use, disclosure or
distribution is prohibited.  If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message.  Thank you for 
your
cooperation and assistance. 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to