Jump to content
masterdx1

[Peticion] Script de pj online por reino

Recommended Posts

<?php

mysql_select_db("player");

$reino1 = "SELECT COUNT(*) as count FROM player WHERE DATE_SUB(NOW() and map_index="1", INTERVAL 10 MINUTE) < last_play;";

$reino2 = "SELECT COUNT(*) as count FROM player WHERE DATE_SUB(NOW() and map_index="21", INTERVAL 10 MINUTE) < last_play;";

$reino3 = "SELECT COUNT(*) as count FROM player WHERE DATE_SUB(NOW() and map_index="41", INTERVAL 10 MINUTE) < last_play;";

$u1 = mysql_query($reino1,$sqlserver);

$u2 = mysql_query($reino2,$sqlserver);

$u3 = mysql_query($reino3,$sqlserver);

$on_reino1 = mysql_fetch_object($u1)->count;

$on_reino2 = mysql_fetch_object($u2)->count;

$on_reino3 = mysql_fetch_object($u3)->count;

echo $on_reino1;

echo $on_reino2;

echo $on_reino3;

?>

Tendras que definir la variable sql server con los datos de tu conexión.

Salu2.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...