Jump to content

assimilated

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

assimilated's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. well that was simple thanks
  2. So all I have to do is add set_time_limit(2) at top?
  3. So i have this script that connects to a game data base and it must select and make a top of some columns in data base. The thing is if the data base is offline then the script kinda blocks the website because it has no timeout option. How can i add like a $timeout=2 (in seconds) thing..so if after 2 seconds it gets no connection the script is killed Thanks in advance <?php $database_info = array( 'host' => '___', 'user' => '___', 'password' => '___', 'l2jdb' => '___' ); @mysql_connect($database_info['host'], $database_info['user'], $database_info['password']) or die(mysql_error()); @mysql_select_db($database_info['l2jdb']) or die(mysql_error()); echo "<table class=\"pvp\">"; $query = "SELECT * FROM characters WHERE accesslevel = 0 ORDER BY pvpkills DESC limit 10"; //change 10 to whatever amount you want to show on your website. $result = mysql_query($query) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { $name = $row['char_name']; $pvpscore = $row['pvpkills']; // Inserting data into the table echo " <tr> <td width=\"110\"><strong> $name</strong></td> <td width=\"50\"><div align=\"center\">$pvpscore</div></td> </tr>"; } echo "</table>"; //closing mysql connection mysql_close(); ?>
×
×
  • 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.