Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Html srifto storis

Parašė shalonyi· 2010 Sau. 19 10:01:49
#1

gal kas zino kp suplonint srifta?
db toks,tas apacioj:

o reiketu mzdg dokio kp virsui ;/
stai kodas:
<?php
//first you need to define db info
define('mySQL_hostname', 'localhost'); //database IP
define('mySQL_database', 'l2jdb'); //database name
define('mySQL_username', 'root'); //database user
define('mySQL_password', ''); //database password
//connects to mysql
$db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password )
or die( 'Error connecting to mysql<br><br>'.mysql_error() );
//connects to Database
$db_select = mysql_select_db( mySQL_database, $db_link )
or die( 'Error connecting to Database<br><br>'.mysql_error() );
//selects desired table
$chars= mysql_query("SELECT `online` FROM `characters` where `online`=1");
//tells how much rows are there (will come helpfull with while loops)
$rows = mysql_num_rows($chars);
echo "<font color=#FFFFFF>Prisijungusiu zaideju: <span style='color:red'>".$rows."</font></div><br><br>"; //prints out the $x number of players online
?>





<center>Geriausiu zaideju top 10:<br><br><br>


<?php

$local_connection = mysql_connect("localhost","root","") or die(mysql_error());
          mysql_select_db("l2jdb") or die(mysql_error());

?>