Jump to content
MakeWebGames

fbiss

Members
  • Posts

    148
  • Joined

  • Last visited

fbiss's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1.   This can also be done without having a second table. Just include a column that holds a Boolean value and if its 1 then the players pull it in their query. The if they "delete" it, it just updates the value to 0. This would allow staff to still see it.
  2. Hi Alex, I was doing a google search today and came across your review.   I truly appreciate that you took the time and effort to write a honest unsolicited review of my game. It deffinitely helps me to visulize what a new player coming to the game would experience. I like your writting style and you do well to explain the overall structure of the game. Keep up the great work! :thumbsup:
  3. I know i personally move threads that I see that are in the wrong category and i do this quite frequently. If members of the forum are annoyed by certain users constantly posting topics to the wrong category, imagine how staff feels having to keep moving their posts. Even if you send them a polite private message to make sure they are posting to the right category, some continue to do so.
  4. Generally speaking, there is a lot of players that will take mods and use them how they arent supposed to be used. 1. What if someone more wealthy in the game decideds to just spam someones mailbox so that they can no longer receive mails. 2. Players should always be able to receive mails from staff no matter what their limit.
  5.   if the stats are running into the billions , then the issue is with the (int) which has a limit of 2,147,483,647
  6. fbiss

    Auctions

    I didnt say that it was the best, i said it wasnt that bad. My $ir query has 9 joins and only takes 0.001 second. What i was saying is, if you have 100 auctions, you are going to be making a ton of queries to the datebase, everytime every users goes to a new page. I pitty your mysql servers.
  7. fbiss

    Auctions

    $ir isn’t that bad if properly indexed. With this modification, even with 100 current auctions, you will get. 1 Select query that pulls 100 rows of data, and then 100 Select queries after that (in the while loop). If you are using the players to replace the use of a cron, you could at least Join the data from both tables into 1 Select statement, use a timestamp condition to limit the query to only needed rows, and index all fields that are used in the join and where statements.
  8. fbiss

    Auctions

    I'm suprised that nobody has mentioned this yet... This modification looks horribly inefficent with every user pulling the information for every auction every page refresh... 8| :wacko:
  9. fbiss

    YQL

    I haven't used it yet, but read this article last week http://net.tutsplus.com/tutorials/other/an-api-for-the-web-learning-yql/
  10. fbiss

    header help

    code looks fine. make sure your getip() function is secure.
  11. no.. now if u were using that session to save something back into the database or file system.. then yea maybe.
  12. my above post was fixed, this should work for you.
  13. thats going to make it never use the Session Try this   if (empty($_SESSION['topgangs'])) { $_SESSION['topgangs']=''; $fivgz=$db->query("SELECT gangNAME, gangID FROM gangs ORDER BY gangRESPECT DESC LIMIT 3"); while($r=$db->fetch_row($fivgz)) { $_SESSION['topgangs'].= "[size="1"]<a href='gangs.php?action=view&ID={$r['gangID']}'>{$r['gangNAME']}<a>[/size] "; } } echo $_SESSION['topgangs'];
  14. change $SESSION['uGANG'] to $_SESSION['uGANG'] at the end   you may want to consider reading up on file caching instead
  15. Heres my function, for v2   function get_gymranks() { global $row, $userid, $db; $ts = $row['strength'] + $row['agility'] + $row['guard'] + $row['IQ'] + $row['labour']; $q = $db->query("SELECT (SELECT COUNT(u.userid) FROM userstats us LEFT JOIN users u ON (u.userid = us.userid) WHERE strength > '{$row['strength']}' AND (u.user_level > 0) AND (u.userid <> $userid)) as strength_rank, (SELECT COUNT(u.userid) FROM userstats us LEFT JOIN users u ON (u.userid = us.userid) WHERE guard > '{$row['guard']}' AND (u.user_level > 0) AND (u.userid <> $userid)) as guard_rank, (SELECT COUNT(u.userid) FROM userstats us LEFT JOIN users u ON (u.userid = us.userid) WHERE agility > '{$row['agility']}' AND (u.user_level > 0) AND (u.userid <> $userid)) as agility_rank, (SELECT COUNT(u.userid) FROM userstats us LEFT JOIN users u ON (u.userid = us.userid) WHERE IQ > '{$row['IQ']}' AND (u.user_level > 0) AND (u.userid <> $userid)) as IQ_rank, (SELECT COUNT(u.userid) FROM userstats us LEFT JOIN users u ON (u.userid = us.userid) WHERE labour > '{$row['labour']}' AND (u.user_level > 0) AND (u.userid <> $userid)) as labour_rank, (SELECT COUNT(u.userid) FROM userstats us LEFT JOIN users u ON (u.userid = us.userid) WHERE strength+agility+guard+IQ+labour > $ts ) as total_rank"); $r = $db->fetch_row($q); $ranks = array('strength' => $r['strength_rank']+1, 'guard' => $r['guard_rank']+1, 'agility' => $r['agility_rank']+1, 'IQ' => $r['IQ_rank']+1, 'labour' => $r['labour_rank']+1, 'total' => $r['total_rank']+1, ); return $ranks; }   now before display of the ranks i have if(!$_SESSION['granks'] || $_SESSION['granktime'] < time()) { $_SESSION['granks'] = get_gymranks(); $_SESSION['granktime'] = time()+60; } $row['ranks'] = $_SESSION['granks'];   now you can use $row['ranks']['strength'] $row['ranks']['agility'] etc.. depending on your code, you may need to change all the $row to $ir
×
×
  • Create New...