this is in sql.. i need the php .. can you help me on discord or TW or AnyDesk? thanks.
If you use old php mssql_connect
use this:
Code:
<?php
$sql_host = "YourIP";
$sql_user = "YourUsername";
$sql_pass = "YourPassword";
$sql_db = "SRO_VT_ACCOUNT";
$sqlLink = mssql_connect($sql_host,$sql_user,$sql_pass);
if(!$sqlLink) die("MSSQL server is not accessable, why should we try to select database ?");
else {
mssql_select_db($sql_db,$sqlLink);
}
$query = mssql_query("SELECT top 1 * FROM _ShardCurrentUser WHERE nShardID = 64 ORDER BY nID desc") or die("Can't connect to database!");
while ($row = mssql_fetch_array($query)) {
echo "
<b>Server: <span style='color:red'><i>YourServerName</i></span> - <span style='color:#fff'>$row[nUserCount]</span><span style='color:green'> of maximum</span> <span style='color:#fff'>2000</span> <span style='color:green'>are currently online!</span></b>
";
}
?>
If You Use New PHP PDO
use this:
Code:
<?PHP
try {
$user = "YourUsername";
$pass = "YourPassword";
$conexao= new PDO("sqlsrv:Server=YourIP,1433;Database=SRO_VT_ACCOUNT", $user, $pass);;
$srdID = 64;
$sql = "SELECT top 1 * FROM _ShardCurrentUser WHERE nShardID = ? ORDER BY nID desc";
$stmt = $conexao->prepare($sql);
$stmt->bindValue(1, $srdID);
$stmt->execute();
$linha = $stmt->fetchAll();
$result = array_shift($linha);
$onlineNow = $result['nUserCount'];
echo "
<b>Server: <span style='color:red'><i>YourServerName</i></span> - <span style='color:#fff'>$onlineNow</span><span style='color:green'> of maximum</span> <span style='color:#fff'>2000</span> <span style='color:green'>are currently online!</span></b>
";
} catch (Exception $ex) {
echo 'erro: ' . $ex->getCode();
}
?>
Quote:
Originally Posted by Devsome
Here not discord. You told him to write in discord.
yea I done here already take it easy bro don't do a storm inside a glass of water..
<?php
$sql_host = "YourIP";
$sql_user = "YourUsername";
$sql_pass = "YourPassword";
$sql_db = "SRO_VT_ACCOUNT";
$sqlLink = mssql_connect($sql_host,$sql_user,$sql_pass);
if(!$sqlLink) die("MSSQL server is not accessable, why should we try to select database ?");
else {
mssql_select_db($sql_db,$sqlLink);
}
$query = mssql_query("SELECT top 1 * FROM _ShardCurrentUser WHERE nShardID = 64 ORDER BY nID desc") or die("Can't connect to database!");
while ($row = mssql_fetch_array($query)) {
echo "
<b>Server: <span style='color:red'><i>YourServerName</i></span> - <span style='color:#fff'>$row[nUserCount]</span><span style='color:green'> of maximum</span> <span style='color:#fff'>2000</span> <span style='color:green'>are currently online!</span></b>
";
}
?>
If You Use New PHP PDO
use this:
Code:
<?PHP
try {
$user = "YourUsername";
$pass = "YourPassword";
$conexao= new PDO("sqlsrv:Server=YourIP,1433;Database=SRO_VT_ACCOUNT", $user, $pass);;
$srdID = 64;
$sql = "SELECT top 1 * FROM _ShardCurrentUser WHERE nShardID = ? ORDER BY nID desc";
$stmt = $conexao->prepare($sql);
$stmt->bindValue(1, $srdID);
$stmt->execute();
$linha = $stmt->fetchAll();
$result = array_shift($linha);
$onlineNow = $result['nUserCount'];
echo "
<b>Server: <span style='color:red'><i>YourServerName</i></span> - <span style='color:#fff'>$onlineNow</span><span style='color:green'> of maximum</span> <span style='color:#fff'>2000</span> <span style='color:green'>are currently online!</span></b>
";
} catch (Exception $ex) {
echo 'erro: ' . $ex->getCode();
}
?>
yea I done here already take it easy bro don't do a storm inside a glass of water..
[Request] Vsro counting total acc play time 11/06/2016 - SRO Private Server - 9 Replies Hi guys,
Like the title above, how can I calculate total online time of an account? I've been searching for a while, but there is no answer for this.
Thanks for help
Counting 11/30/2007 - Conquer Online 2 - 1 Replies My story is that I'm not a really big contributer of the epvpers forums, and I'm doing this because I want to contribute something but I have dial-up connection so I cant really contribute with that.
I took this idea from someone that already did this (cant remember who).
Anyways, the instructions are this, i'll start the thread with the number 1 and each person counts up to the number 999. Its simple.
So lemme start.
1
Counting thread 05/04/2007 - Conquer Online 2 - 16 Replies dont post more than once and if u dont wanna count dont flame plz its just a little fun
since this is a question forum the question is.....how many of us are there?.....
ill start
1