Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Users currently online.

tmhai
Minted
Posted on Nov 08, '07 at 03:33 am

I’m trying to display all the users who are currently online within the past 15 mins. At the moment I’m using this code, but it isn’t working.

$link = mysql_connect("localhost", "tmhai", "*******"); mysql_select_db("tmhai_mint", $link);

$result = mysql_query("SELECT * FROM mint_visit WHERE dt <= (". time() ." - 900)", $link); $num_rows = count($result);

Would someone be able to help me out on this here.

Till
Third-Party Pepper Developer
Posted on Nov 08, '07 at 08:58 am
tmhai
Minted
Posted on Nov 26, '07 at 09:00 am

I’m real sorry for sounding stupid, but I really don’t know what to do. I was provided the code above so I have absolutely no idea what it does, nor do I know what to do with the information in the above website.

Could someone perhaps code this for me? Please.

finny
Minted
Posted on Nov 26, '07 at 03:45 pm

Well, depending on what referrer_is_local means in the database (and I don’t know) then you can probably pull something out, but until someone confirms, I can’t really advise further

Till
Third-Party Pepper Developer
Posted on Nov 28, '07 at 04:43 am

Replace count() by mysql_num_rows() and dt <= by dt >=.

finny
Minted
Posted on Nov 28, '07 at 10:06 am

Surely this will only show page views in the last 15 mins and not unique users? Hence why I figured it would have to be tied to referrer_is_local (I’m assuming, perhaps incorrectly, that this is equal to 0 if it is their first visit and 1 thereafter)

Till
Third-Party Pepper Developer
Posted on Nov 28, '07 at 10:14 am

Or use the secret crush cookie : )

You must be logged in to reply. Login above or create an account