0

How to make query in mysql when I have table Manage :

number=1 , name=tanti, timeIn=07:00:00,timeOut=09:00:00

I want Select name and time in my pc is 08:00:00 but I want still get "tanti" because 08:00:00 > timeIn and 08:00:00 < timeOut. Help me pleaseeee

Barmar
  • 669,327
  • 51
  • 454
  • 560

1 Answers1

0

It's just like you wrote in your question:

SELECT name
FROM Manage
WHERE '08:00:00' > timeIn AND '08:00:00' < timeOut

You can also shorten it using BETWEEN:

SELECT name
FROM Manage
WHERE '08:00:00' BETWEEN timeIn AND timeOut
Barmar
  • 669,327
  • 51
  • 454
  • 560