MySQL Forums
Forum List  »  Newbie

Query, equal tag and more variable
Posted by: Papp David
Date: March 22, 2013 01:42AM

(Sorry English)

Please help.

I have a Mysql table:

user_id | workinghours
----------------------
1 | 3
1 | 8
2 | 4
2 | 8
3 | 13
3 | 15
5 | 3
5 | 8
5 | 10
6 | 3
6 | 10
6 | 16
6 | 20
6 | 21

I would like query in this table:
SELECT user_id FROM tablename WHERE "workinghours = 3 AND workinghours = 8 AND ..."
Then I get user_id = 1,5..... , but this query not working. :( ( Only those people who are on workinghours (3,8) )

Thanks a lot!

David

Options: ReplyQuote


Subject
Written By
Posted
Query, equal tag and more variable
March 22, 2013 01:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.