How many users online in the last 24-hours using time()?


Posted on 16th Feb 2014 07:03 pm by admin

I'm fairly new to PHP. I have a MySQL table called 'users' and a field called 'loggedin' which is in time() format.

I need a query that'll check how many players have logged in within the last 24-hours, but I'm not sure where to start. I already have the database connection setup, and just need the amount to be set to "$online24h"

Can anyone help me please?

No comments posted yet

Your Answer:

Login to answer
253 Like 25 Dislike
Previous forums Next forums
Other forums

Php navigation
I have four buttons on a php page.
If i click a button it will redirect to different php pages.

PHP Captcha Error help - replace the "die" command
Hi All,

I am after a bit of help with a Captcha spam protection box.

The site gave me

Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that

Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as

sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the

Finding digits in variable containing text, and IDing them
$romanstock = "http://www.remoteprice.com/data.asp?storeid=123&itemcode=456&typ

values not being entered into table
hi. I;ve created a form, so that when a user enters data into it, it gets added to a table in a data

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

How to write on database when a link is clicked?
Hi, I have a list of products in a gridview. When the link is clicked currently it takes to an ext

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash