Jump to content
  • 0

[GF/RP] [MySQL] Statistici online


hopingsteam

Question

Salutare SA-MP Romania,

Am mai multe probleme legate de MySQL:

1. Am reusit sa-mi mut serverul pe MySQL, dar folosind <a_sampmysql> , nu <a_mysql> ! Am citit undeva pe SA-MP.com ca ar fi recomandat sa am <a_mysql>, nu cel pe care il folosesc eu.

2. As vrea sa construiesc "Statistici Online" ! Nu stiu de unde sa apuc problema ! Daca sunteti buni sa-mi spuneti pas-cu-pas cum trebuie sa procedez, v-as fi recunoscator ! ... Puteti sa-mi aratati si o pagina simpla, gen: "Adminii Serverului", ma prind destul de repede cum sa fac mai departe !

Cred ca este o chestie de genul: "cauta pe cei care au pAdmin mai mare ca 0" ...

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Sunt mai multe pluginuri pentru mysql, a_sampmysql nu cred ca e acelasi cu a_mysql,eu ti'as recomanda pluginul asta http://forum.sa-mp.com/showthread.php?t=56564 ,dar e bun si cel care il ai

Pai trebuie sa inveti php pentru statistici online,

1.Trebuie sa te conectezi la baza de date.

2.Trebuie sa iei date din acea baza de date.

3.Sa le afisezi ..

Uite aici un exemplu: http://solidfiles.com/d/2b292fe879/ , restul depinde de tine ,daca intelegi sau nu .


<?php
mysql_connect("HOST", "USER", "parola");
mysql_select_db("DATABASE TABLE");
if(mysql_ping()==0)die("mysql down!");

$playerquery = mysql_query("SELECT `name`,`pAdmin` FROM `users` WHERE `pAdmin`>0");
if(mysql_num_rows($playerquery) == 0)
{
echo '<p><b>No Admins</b></p>';
}
else
{
echo "<table border=\"2\"><tr><td>NAME</td><td>AdminLevel</td></tr>";
while($p = mysql_fetch_array($playerquery))
{
echo "<tr>";
echo "<td>" . $p["id"]."</td>";
echo "<td>" . $p["name"]."</td><td>".$p["pAdmin"]."</td>";
echo "</tr>";
}
echo "</table>";
}
?>

Link to comment
Share on other sites

Host : de la baza de date,care ti-a facut-o de unde ai hostul.

User : user de la baza de date,care ti-a facut-o de un ai luat hostul.

Parola : parola de la baza de date,care ti-a facut-o de unde ai luat hostul.

Gen :

Host: localhost

User: baza_de_date

Database: baza_de_date

Password: sdgdsfgdfsg

PHPMyAdmin: www.test.ro/mysql

Trebuie sa iei legatura cu cei de la host,pentru a afla chestiile acestea :D.

8vzsrd5t8btzshztdhkc.png

www.play-gaming.ro/forum

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.