Hello.
I was trying to make total online in the server script for offical files but I didn't know how to continue.
Need to count all accounts with column isuse = 'j'
Somone can give me working script or teach me how?
Hello.
I was trying to make total online in the server script for offical files but I didn't know how to continue.
Need to count all accounts with column isuse = 'j'
Somone can give me working script or teach me how?
I didn't try it but it should work.PHP Code:<?php
ini_set('display_errors', 0);
$connection = mssql_connect('YOURHOST', 'sa', 'YOURPASSWORD'); //Change YOURHOST and YOURPASSWORD!
if(!connection || !mssql_select_db('ACCOUNT_DBF', $connection))
{
die('Unable to connect or select database!');
}
$query = mssql_query("SELECT account FROM ACCOUNT_TBL WHERE isuse = 'J'");
$result = mssql_num_rows($query);
echo $result;
?>
Thank you so much. It's working,If you'll need anything just PM me. Thanks
Add me to your MSN if you can
TheUnrealz@gmail.com
edit:
The script you gave me is a little wrong,I fixed it
here is the fixed one:
PHP Code:<?php
ini_set('display_errors', 0);
$connection = mssql_connect('YOURHOST', 'sa', 'YOURPASSWORD'); //Change YOURHOST and YOURPASSWORD!
if(!connection || !mssql_select_db('ACCOUNT_DBF', $connection))
{
die('Unable to connect or select database!');
}
$query = mssql_query("SELECT account FROM ACCOUNT_TBL_DETAIL WHERE isuse = 'J'");
$result = mssql_num_rows($query);
echo $result;
?>
Last edited by theunreal; 16-12-09 at 06:43 PM.
You're welcome! ;)
Dude, what the hell is wrong with you these days?
That's the hard way of going about it you could just use the CCU tables where it allows you to find out what cluster/etc they're all on.