Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can I make a counter which shows at what time the result from the database was returned. I would like someone to direct me how it works and how it works with what it will work.

What I have tried:

What have you tried?
I only want a tips.
Posted
Updated 6-Sep-18 7:49am
Comments
OriginalGriff 6-Sep-18 10:39am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
You really need to expand on that, explaining what you are trying to do, what you have tried, and where you are stuck. I for one have no idea what you are trying to achieve, so I couldn't begin to help you if I wanted to! The better the information you give us, the better the answer we can give you.

Use the "Improve question" widget to edit your question and provide better information.
ZurdoDev 6-Sep-18 11:47am    
It will require a bit of code. You'll need to ask something much more specific.
MadMyche 6-Sep-18 13:19pm    
As previously noted, your question is lacking. The basics of this would be to create a date-time variable before the DB call and then another after. Subtracting the first from the second will give you elapsed time.
Mike CJ 6-Sep-18 13:31pm    
I want create counter like google "About 121,000,000 results (0.68 sec)" the one in brackets. I do not know just what to do, whether in Js or immediately in php

1 solution

OK - Tips - based upon your comment to the comments:

On server (php) where the work is done.
1 - get_the_start_time.
2 - request the data.
3 - get_the_end_time.

Now, you can manipulate this for your reporting (like you google example)

Do what you want with your data (statistics, for example a count).
Subtract the start time from the end time.

You now have your statistics and timing.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900