rockwood
Members-
Posts
452 -
Joined
-
Last visited
-
Days Won
17
Content Type
Profiles
Forums
Events
Everything posted by rockwood
-
* is doing what ? its not for db problem ?? if you can do this vi /etc/my.cnf "mysql -e "set global max_connections = 700;"" and you should optimize your queries yes. But you can also run the command i gave u
-
in html bad quotes also make some difference (due to quotes reading matter )
-
<?php require("top.php"); ?> <?php require("usercheck.php"); require("prison_check.php"); ?> <form method="post"> <table width="550" border="0" align="center" cellpadding="0" cellspacing="2" class="table"> <tr> <td colspan="3" align="left" class="head">Top 10 Ranked Players:</td> </tr> <tr> <td width="150" align="left" class="sub">Name:</td> <td width="150" align="left" class="sub">Rank:</td> <td width="250" align="left" class="sub">Gang:</td> </tr> <?php $result = mysql_query("SELECT name,gang,exp,rank FROM login WHERE staff='0' AND sitestate='0' ORDER BY exp + 0 DESC LIMIT 0,10") or die(mysql_error()); // keeps getting the next row until there are no more to get while ($row = mysql_fetch_array($result)) { // Print out the contents of each row into a table ?> <tr> <td width="150" align="left" class="cell"><?php echo "<a href=\"view_profile.php?name=" . $row['name'] . "\" onFocus=\"if(this.blur)this.blur()\">" . $row['name'] . "</a>"; ?></td> <td width="150" align="left" class="cell"><?php echo $rank_array[$row['rank']]; ?></td> <td width="250" align="left" class="cell"><?php if (empty($row['gang'])) { echo "No Gang."; } else { echo "<a href=\"view_gang.php?name=" . $row['gang'] . "\" onFocus=\"if(this.blur)this.blur()\" >" . $row['gang'] . "</a>"; }?></td> </tr> <?php } // while ?> </table> <table width="550" border="0" align="center" cellpadding="0" cellspacing="2" class="table"> <tr> <td colspan="3" align="left" class="head">Top 10 wealthiest Players:</td> </tr> <tr> <td width="150" align="left" class="sub">Name:</td> <td width="150" align="left" class="sub">Wealth:</td> <td width="250" align="left" class="sub">Gang:</td> </tr> <?php $result = mysql_query("SELECT money,name,gang FROM login WHERE staff='0' AND sitestate='0' ORDER BY money + 0 DESC LIMIT 0,10") or die(mysql_error()); // keeps getting the next row until there are no more to get while ($row = mysql_fetch_array($result)) { // Print out the contents of each row into a table ?> <tr> <td width="150" align="left" class="cell"><?php echo "<a href=\"view_profile.php?name=" . $row['name'] . "\" onFocus=\"if(this.blur)this.blur()\">" . $row['name'] . "</a>"; ?></td> <td width="150" align="left" class="cell"><?php if ($row['money'] >= 0) { $profile_wealth = $wealth_array[0]; } if ($row['money'] >= 25000) { $profile_wealth = $wealth_array[1]; } if ($row['money'] >= 50000) { $profile_wealth = $wealth_array[2]; } if ($row['money'] >= 100000) { $profile_wealth = $wealth_array[3]; } if ($row['money'] >= 250000) { $profile_wealth = $wealth_array[4]; } if ($row['money'] >= 500000) { $profile_wealth = $wealth_array[5]; } if ($row['money'] >= 1000000) { $profile_wealth = $wealth_array[6]; } if ($row['money'] >= 10000000) { $profile_wealth = $wealth_array[7]; } if ($row['money'] >= 1000000000) { $profile_wealth = $wealth_array[8]; } if ($row['money'] >= 10000000000) { $profile_wealth = $wealth_array[9]; } echo $profile_wealth;?> </td> <td width="250" align="left" class="cell"><?php if (empty($row['gang'])) { echo "No Gang."; } else { echo "<a href=\"view_gang.php?name=" . $row['gang'] . "\" onFocus=\"if(this.blur)this.blur()\" >" . $row['gang'] . "</a>"; }?></td> </tr> <?php } // while ?> </table> </p> </form> <?php require("bottom.php"); ?> try now
-
still having problem ? thats a mysql limitation, but you may need to just add db indexes(http://dev.mysql.com/doc/refman/5.0/en/create-index.html) if your queries are taking so long that 30 of them are processing at the same time (unless you have thousands of users on at once) help link :- https://dev.mysql.com/doc/refman/5.0/en/user-resources.html you could release your connection as soon as you're finished with it, you could perform faster queries, you could raise your limit on the mysql side, there's no easy debugging that in a jiffy
-
me too do when my complete
-
from where are you using JQuery lib ??(means using by online or on your server)
-
for mod rewriting, you have to know Regex properly and as per my view by mod_rewriting you can make url nicer and less input way for users
-
please click on Tools->Web Developer->Error Console and if you get any error paste here note : - after execution of code it will be show error
-
what is url link ?
-
sent example code and i can do any work in NWE easily
-
i am not bad in all required skills but communication is my barrier
-
1. one more point need notice, are you facing this problem from starting or after add any modification (like after add any new mod in your current game ). 2. please check properly mysql database (i am talking about your cpanel phpmyadmin). it will be miner problem so please check by cool mind. if you need my more help then you can PM me or contact me on Skype .
-
which engine you are using ?
-
GL is grpg ???
-
what is his game url ?
-
Parse error: syntax error, unexpected end of file in /home/pokemo44/public_html/login.php on line 83
-
i think MWG chat room is helpful in this case
-
you are raising a valid point , and i am fully agree with you.
-
what kind of service you have shared or VPS ? you are using which version of mccode ?? in v2 function disconnect() { if($this->connection_id) { mysql_close($this->connection_id); $this->connection_id=0; return 1; } else { return 0; } } hint for version 2:- (header.php) just in endpage() at very end line of code call disconnect() hint for mysql :- MAX USER_CONNECTIONS make sure it is By default 0 (unlimited) (in setting of pphpmyadmin) hope it may help you other wise your queries are not optimized
-
http://www.vbulletin.org/forum/showthread.php?t=137238 //------------------------------------------------------------------------------------ Check the MAX USER_CONNECTIONS setting on your MySQL server for the user. In PHPMyAdmin go to the server page (Click on the Server:<>) and in the sub-menu click on priviledges. Edit the user and the MAX USER_CONNECTIONS will be on the right side. By default I believe it is set to 0 (unlimited), yours maybe restricted depending on who setup the server. //----------------------------------------------------------------------------------- 5 down vote First of all, try to know from your hosting server administrator about the max consecutive active connections available to the MySQL database. This is the most basic & primary information to have knowledge about. If your page(s) load in a decent amount of time and release the connection once the page is loaded, it should be fine. The problem occurs when your script takes some long time to retrieve information from the database or maintains the connections. Since you are executing INSERT and / or UPDATE operations of millions of rows, so you may have some problem. Additionally, if you fail to close connections in your script(s), it is possible that someone will load a page and instead of closing the connection when the page is loaded, it is left open. No one else can then use that connection. So please make sure that at the end of execution of all the MySQL / SQL queries, the database connection is closed. Also please make sure that your server provides more than 250 connections, since 100 connections is available in almost all the servers generally. Also make sure that you are not using the persistent connections (which is available when using the built-in function "mysql_pconnect()"), since this will lock up the user until the connection is manually closed. Hope it helps.
-
okay, show me good PDO example
-
http://picpaste.com/pics/samplework-KKwzbIQu.1375969217.jpg <?php include("includes/header.php"); print "<h3>Equipped Items</h3><hr />"; $equip = array(); $sql = "SELECT * FROM items WHERE itmid IN(:equip_primary,:equip_secondary,:equip_armor)"; $stmt = $db->prepare($sql); $stmt->bindValue(":equip_primary", $row['equip_primary'], PDO::PARAM_INT); $stmt->bindValue(":equip_secondary", $row['equip_secondary'], PDO::PARAM_INT); $stmt->bindValue(":equip_armor", $row['equip_armor'], PDO::PARAM_INT); $stmt->execute(); while ($r = $stmt->fetch()) { $equip[$r['itmid']] = $r; } print "<table width='75%' cellspacing='1' class='uprofcontdisp'> <tr> <th width='33%'>Primary Weapon</th> <td>"; if (isset($equip[$row['equip_primary']]['itmid'])) { print htmlentities($equip[$row['equip_primary']]['itmname']) . "</td><td><a href='unequip.php?type=equip_primary'>Unequip Item</a></td></tr></table>"; } else { print "None equipped.</td><td>Equip Primary</td></tr></table>"; } print"<table width='75%' cellspacing='1' class='uprofcontdisp'><tr><th width='33%'>Secondary Weapon</th><td>"; if (isset($equip[$row['equip_secondary']]['itmid'])) { print htmlentities($equip[$row['equip_secondary']]['itmname']) . "</td><td><a href='unequip.php?type=equip_secondary'>Unequip Item</a></td></tr></table>"; } else { print "None equipped.</td><td>Equip Secondary</td></tr></table>"; } print "<table width='75%' cellspacing='1' class='uprofcontdisp'><tr><th width='33%'>Armor</th><td>"; if (isset($equip[$row['equip_armor']]['itmid'])) { print htmlentities($equip[$row['equip_armor']]['itmname']) . "</td><td><a href='unequip.php?type=equip_armor'>Unequip Item</a></td></tr></table>"; } else { print "None equipped.</td><td>Equip Armor</td></tr></table>"; } print "</tr> </table>"; if (isset($equip[$row['equip_primary']]['itmtype']) && $equip[$row['equip_primary']]['itmtype'] == 4) { echo "<hr>"; ?> <a href='ammo.php'>Ammo Locker</a> <?php } print"<hr /> <h3>Inventory</h3><hr />"; $sql1 = "SELECT iv.*,i.*,it.* FROM inventory as iv LEFT JOIN items as i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid = :inv_userid ORDER BY i.itmtype ASC, i.itmname ASC"; $stmt = $db->prepare($sql1); $stmt->bindValue(":inv_userid", $row['id'], PDO::PARAM_INT); $stmt->execute(); if ($stmt->rowCount() == 0) { print "<b>You have no items!</b>"; } else { print "<b>Your items are listed below.</b><br /> <table class='uprofcontdisp' cellspacing='1'> <tr> <td hidden=''></td> <td width='25%'>Item</td> <td width='15%'>Value</td> <td width='20%'>Total Value</td> <td width='40%'>Links</td> </tr>"; $lt = ""; while ($v = $stmt->fetch()) { if ($lt != $v['itmtypename']) { $lt = $v['itmtypename']; print "\n<tr><td colspan=4><b> " . htmlentities($lt) . " </b></td></tr>"; } print "<tr><td>" . htmlentities($v['itmname']); if ($v['inv_qty'] > 1) { print " x" . $v['inv_qty']; } print "</td><td>$" . $v['itmsellprice'] . "</td><td>"; print "$" . ($v['itmsellprice'] * $v['inv_qty']); print "</td><td>"; ?> <a href="iteminfo.php?ID=<?php echo $v['itmid'] ?>">Info</a> <a href="itemsend.php?ID=<?php echo $v['inv_id'] ?>">Send</a> <a href="itemsell.php?ID=<?php echo $v['inv_id'] ?>">Sell</a> <a href="imadd.php?ID=<?php echo $v['inv_id'] ?>">Market</a> <?php if ($v['effect1_on'] || $v['effect2_on'] || $v['effect3_on'] || $v['effect4_on']) { ?> <a href="itemuse.php?ID=<?php echo $v['inv_id'] ?>">Use</a> <?php } if ($lt == "Melee Weapon" || $lt == "Gun" || $lt == "Armour") { ?> <a href="equip_weapon.php?ID=<?php echo $v['inv_id'] ?>">Equip</a> <?php } print "</td></tr>"; } echo "</table>"; } include("includes/footer.php"); ?>
-
i will clear, why i said these words
-
i will make new thread and explain why i said this and i will prove my posted words are perfect