Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 14:58

  • Please register to post and access all features, it's quick, easy and FREE!

 

mssql/Odbc Connection

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2012
Posts: 102
Received Thanks: 4
mssql/Odbc Connection

I found a top 100 ranking script including a mssql_connect

is there a way to make it a odbc connection instead of mssql?
if not can anyone tell me how this should be connected to the server like mssql_connect


Code:
<?php 
	$host="......";
    $user = "....."; 
    $pw = "..."; 
    $db = "..."; 
	$i="0";
	$counter=1;
           
    $connect = mssql_connect($host,$user,$pw)
    or die("Can't connect to the datebase."); 
     
    mssql_select_db($db,$connect) 
    or die("Can't select the datebase");
	  mssql_select_db($db,$connect);
	
	$Query="SELECT Top 100  name , exp, lv, job,jlv,permission, login_time,login_time,pkc from Telecaster . dbo.Character 
where permission ='0' and name not like '@%' order by exp desc";
	
	$Result = mssql_query($Query);
	?>

<table class="tabclass" >		
<tr bgcolor='#121212' align='center' height='40px'>
<td width='2%' bgcolor='#b41706'>№</td>
<td width='82%' bgcolor='#b41706'>Имя</td>
<td width='3%' bgcolor='#b41706'>Уровень</td>
<td width='3%' bgcolor='#b41706'>Ур.Пр</td>
<td width='3%' bgcolor='#b41706'>Количество убийств</td>
<td width='3%' bgcolor='#b41706'>Профессия</td>
<?php
error_reporting( E_ERROR ); 
while($Row=mssql_fetch_array($Result)){
if ($counter % 2 == 0)
			 echo "<tr bgcolor='#e60f17' align='center'>";
	else     echo "<tr bgcolor='#c5632a' align='center'>";
			echo "<td>",$counter,"</td><td color='#1e1e1e'>",$Row["name"],"</td><td>",$Row["lv"],"</td><td>",$Row["jlv"],"</td><td>",$Row["pkc"],"</td><td>";

switch ($Row["job"])
{
 case 100 : echo "<div align='center'><img src='images/class/100.jpg' alt='Странник'>"; break;
 case 101 : echo "<div align='center'><img src='images/class/101.jpg' alt='Кадет'>"; break;
 case 102 : echo "<div align='center'><img src='images/class/102.jpg' alt='Шаман'>"; break;
 case 103 : echo "<div align='center'><img src='images/class/103.jpg' alt='Заклинатель'>"; break;
 case 110 : echo "<div align='center'><img src='images/class/110.jpg' alt='Солдат'>"; break;
 case 111 : echo "<div align='center'><img src='images/class/111.jpg' alt='Стрелок'>"; break;
 case 112 : echo "<div align='center'><img src='images/class/112.jpg' alt='Друид'>"; break;
 case 113 : echo "<div align='center'><img src='images/class/113.jpg' alt='Знахарь'>"; break;
 case 114 : echo "<div align='center'><img src='images/class/114.jpg' alt='Колдун'>"; break;
 case 120 : echo "<div align='center'><img src='images/class/120.jpg' alt='(Мастер-Класс Солдата)'>"; break;
 case 121 : echo "<div align='center'><img src='images/class/121.jpg' alt='(Мастер-Класс Стрелка)'>"; break;
 case 122 : echo "<div align='center'><img src='images/class/122.jpg' alt='(Мастер-Класс Друида)'>"; break;
 case 123 : echo "<div align='center'><img src='images/class/123.jpg' alt='(Мастер-Класс Знахаря)'>"; break;
 case 124 : echo "<div align='center'><img src='images/class/124.jpg' alt='(Мастер-Класс Колдуна)'>"; break;
 case 200 : echo "<div align='center'><img src='images/class/200.jpg' alt='Следопыт'>"; break;
 case 201 : echo "<div align='center'><img src='images/class/201.jpg' alt='Паладин'>"; break;
 case 202 : echo "<div align='center'><img src='images/class/202.jpg' alt='Волшебник'>"; break;
 case 203 : echo "<div align='center'><img src='images/class/203.jpg' alt='Зверолов'>"; break;
 case 210 : echo "<div align='center'><img src='images/class/210.jpg' alt='Рыцарь'>"; break;
 case 211 : echo "<div align='center'><img src='images/class/211.jpg' alt='Крестоносец '>"; break;
 case 212 : echo "<div align='center'><img src='images/class/212.jpg' alt='Капеллан '>"; break;
 case 213 : echo "<div align='center'><img src='images/class/213.jpg' alt='Клирик '>"; break;
 case 214 : echo "<div align='center'><img src='images/class/214.jpg' alt='Странник'>"; break;
 case 220 : echo "<div align='center'><img src='images/class/220.jpg' alt='(Мастер-Класс Рыцаря)'>"; break;
 case 221 : echo "<div align='center'><img src='images/class/221.jpg' alt='(Мастер-Класс Крестоносца)'>"; break;
 case 222 : echo "<div align='center'><img src='images/class/222.jpg' alt='(Мастер-Класс Каппелана)'>"; break;
 case 223 : echo "<div align='center'><img src='images/class/223.jpg' alt='(Мастер-Класс Клирика)'>"; break;
 case 224 : echo "<div align='center'><img src='images/class/224.jpg' alt='(Мастер-Класс Дрессировщика)'>"; break;
 case 300 : echo "<div align='center'><img src='images/class/300.jpg' alt='Бродяга'>"; break;
 case 301 : echo "<div align='center'><img src='images/class/301.jpg' alt='Наемник'>"; break;
 case 302 : echo "<div align='center'><img src='images/class/302.jpg' alt='Неофит'>"; break;
 case 303 : echo "<div align='center'><img src='images/class/303.jpg' alt='Адепт'>"; break;
 case 310 : echo "<div align='center'><img src='images/class/310.jpg' alt='Ассасин '>"; break;
 case 311 : echo "<div align='center'><img src='images/class/311.jpg' alt='Охотник '>"; break;
 case 312 : echo "<div align='center'><img src='images/class/312.jpg' alt='Маг хаоса'>"; break;
 case 313 : echo "<div align='center'><img src='images/class/313.jpg' alt='Чернокнижник '>"; break;
 case 314 : echo "<div align='center'><img src='images/class/314.jpg' alt='Чародей'>"; break;
 case 320 : echo "<div align='center'><img src='images/class/320.jpg' alt='(Мастер-Класс Ассасина)'>"; break;
 case 321 : echo "<div align='center'><img src='images/class/321.jpg' alt='(Мастер-Класс Охотника)'>"; break;
 case 322 : echo "<div align='center'><img src='images/class/322.jpg' alt='(Мастер-Класс Мага Хаоса)'>"; break;
 case 323 : echo "<div align='center'><img src='images/class/323.jpg' alt='(Мастер-Класс Чернокнижника)'>"; break;
 case 324 : echo "<div align='center'><img src='images/class/324.jpg' alt='(Мастер-Класс Чародея)'>"; break;
}
echo "</div></td></tr>";
if ($counter==100)
    break;
else
    $counter++;
	}
	echo "</table>";
mssql_close($connect);
?>



Mslolita is offline  
Thanks
1 User
Old   #2
 
elite*gold: 0
Join Date: Aug 2011
Posts: 535
Received Thanks: 231
You should learn the basic PHP first.


marekrndr is offline  
Old   #3
 
elite*gold: 0
Join Date: Oct 2010
Posts: 2,557
Received Thanks: 2,411
Google "SQLSRV PHP Driver 3.0"

It replaced the MSSQL API
ismokedrow is offline  
Old   #4
 
elite*gold: 0
Join Date: Aug 2012
Posts: 3
Received Thanks: 3
nulled


Sajital is offline  
Thanks
2 Users
Old   #5
 
elite*gold: 0
Join Date: Dec 2012
Posts: 102
Received Thanks: 4
nice thanks !

i saw a online status on 1 of the pservers like this character (name) Online/Ofline Last login time 30 min example

you know how to insert this in the same script?

Quote:
Originally Posted by Sajital View Post
i did it for odbc, first of all;
You must active odbc;

ps: (Ekle = Add, Son= End, ileri = Next )

http://i.imgur.com/viIrw.jpg

download:


-
Mslolita is offline  
Old   #6
 
elite*gold: 0
Join Date: Aug 2011
Posts: 535
Received Thanks: 231
Quote:
Originally Posted by Mslolita View Post
you know how to insert this in the same script?
Code:
<?php
$con = mysql_connect("server name","username","password");
if (!$con)
  {
  die('Error connecting: ' . mysql_error());
  }

mysql_select_db("my_db", $con);

$result = mysql_query(SELECT TOP 10 account, name, lv, jlv, exp, huntaholic_point, chaos, gold FROM Telecaster.dbo.Character WHERE name NOT LIKE '%@%' AND lv < 170 AND permission = 0 ORDER by lv DESC");

echo "<table border='1'>
<tr>
<th>Account</th>
<th>Character</th>
<th>Level</th>
<th>Job level</th>
<th>Experience</th>
<th>Gen points</th>
<th>Lak points</th>
<th>Ruppee</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['account'] . "</td>";
  echo "<td>" . $row['name'] . "</td>";
  echo "<td>" . $row['lv'] . "</td>";
  echo "<td>" . $row['jlv'] . "</td>";
  echo "<td>" . $row['exp'] . "</td>";
  echo "<td>" . $row['huntaholic_point'] . "</td>";
  echo "<td>" . $row['chaos'] . "</td>";
  echo "<td>" . $row['gold'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

mysql_close($con);
?>


marekrndr is offline  
Thanks
1 User
Reply



« Previous Thread | Next Thread »

Similar Threads
[Release] PVP Rankings (MSSQL ODBC)
First of all please don't ask how to use these files in this thread. There are plenty of sites on the internet which explain how to set up a...
57 Replies - Shaiya PServer Guides & Releases
[RELEASE] Secure PHP Web Registration Script (MSSQL ODBC)
This is a modernized version of my old registration script. It uses a safer method of querying the database that does not rely on escaping input...
45 Replies - Shaiya PServer Guides & Releases
creating ODBC connection
did someone create the odbc connection for the Server Files under Windows 7 could someone tell me how to create this connection? would be great...
0 Replies - SRO PServer Ask the Experts
MSSQL & ODBC question
What version of MSSQL do you need to run the files? 2005 or 2008? (or 2008 R2?) Also, can anyone post a tutorial of setting up ODBC? You can...
11 Replies - SRO PServer - Discussions / Questions
[RELEASE]Web Pack ( MSSQL / ODBC )
Hello guys. Here my little Web Script Pack as MSSQL and ODBC version. I hope , i have found now all bugs and errors and its work. In the...
8 Replies - Dekaron Private Server



All times are GMT +2. The time now is 14:58.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.