php - mysql counting results between two datetime -


In fact it is expected that it can be done, but I am feeling the need to solve a problem.

There is an inventory booking system for the item item. Every item gets booked in the hour, then some can go within a few hours and go out while others can be the other day.

So in my column I have 2 day time fields. inside. But I can have many items, so in theory I can book 10 widgets.

Say that the next employee comes in and wants to book another widget. I have a way to find out that there are people available for that widget when they want to book their widgets. . That's why the system will need a loop through the table and see how many widgets are booked for the time when they are asking.

Therefore, 6 out of 10 has been booked so we can allow other widgets to be booked. In other words, I should be able to tell how many widgets have been booked during that time, when the employee wants to book it out.

I may have hurt this voice for a long time but hope is someone can give advice.

If you can, thank you in advance.

All of these widgets will be found which were checked before they were required for you, They will not be checked out unless required.

  SELECT COUNT (*) from widgets where & lt; $$ Nukequeta Time $$ and Out & gt; $$ nuccintime $$  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -