Jump to content
MakeWebGames

Armageddon

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Armageddon's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. function strip_my_slashes($text) // ($text) Is nothing.
  2. My thoughts now: Are you willing to learn? On MSN, you said you were going to learn and become a good Web Developer, now your wanting to slice PSD? It's quite weird, cause I can see you frustrating yourself, and going onto something different and easier. So please stick with this. I don't like(hate it) see people blow something off(sounds horny right). Why do you think most people CBA with school. But seriously. Stick with it mate. You never know what happen in the future. :)
  3. Hello, Well I've seen some modifications, and some are great as an Idea! But some ruin it from the coding. Mainly is the performance on my concern, so today, I am going to to show you have to increase your performance. This is not going to be a BIG (S.A). But I will be easy to understand. :) So first I'll start of with: Selecting So I've seen a few mods selecting everything. Now, when selecting all the table(*), it will select EVERYTHING from that table. Some people don't seem to understand. I have suggested this to some friends on MSN not to select everything. Around 88% said what is needed to select. Now, I understand begginer's(I don't like calling people Noobs -.-) don't know what to select. So I look around on MWG and look for some examples. I found something that is easy to understand. Now look at this code:   $q=$db->query("SELECT cm.*, u.* FROM crystalmarket cm LEFT JOIN users u ON u.userid=cm.cmADDER ORDER BY cmPRICE/cmQTY ASC"); while($r=$db->fetch_row($q)) { if($r['cmADDER'] == $userid) { $link = "[url='cmarket.php?action=remove&ID={$r[']Remove[/url]"; } else { $link = "[url='cmarket.php?action=buy&ID={$r[']Buy[/url]"; } $each= abs(intval($r['cmPRICE'] / $r['cmQTY']));   Now as you can see, there is some very dodgey selecting there, and that is self is not needed. Lets look at it first. SELECT cm.*, u.*: Now if you saw what I typed up there - (*) - Selects everything from a table. This coder has decided to select the same table twice. And if you can see (cm) I looked at table for the `crystal market` and cm is connected to (cmID - cmQTY - cmPRICE - etc...) Seriously.. WTF! On another part of the code, as most coders can tell. while($r = $db->fetch_row($q)): While(Read that). $r is going to Assign(=) to the query ($q). Now if we go down more(Remember ($r) now assigns to the query ($q)). {$r['cmID']} || {$r['cmID']} || {$r['cmPRICE']} || {$r['cmQTY']} || Now before some of you ask(Who know what there doing) yes I have done cmID. Yes. Because it's there. For people who are most probably think(Should I add `cmID` twice?) Well no. It's already been select so there is no need to select it twice. Anyway, as you can see below, there are 4(4) $r grabbing what's needed here. The fore, they need to be selected. That's all. Now all these extra stuff like (LEFT JOIN users u) It's not needed as it's already adding in `users`. Extra stuff is not needed so.. Just.. Scare them.. Rawr and stuff... So... Let's fix this up :)   $Q = $db->query("SELECT `cmID` , `cmQTY` , `cmPRICE` FROM `crystalmarket` LEFT JOIN `users` ON `userid` = `cmADDER` ORDER BY `cmPRICE` / `cmQTY` ASC"); while ($r = mysql_fetch_row($Q)) // Person Preference (mysql_) { if($r['cmADDER'] == $userid) { $link = "[url='cmarket.php?action=remove&ID={$r[']Remove[/url]"; } else { $link = "[url='cmarket.php?action=buy&ID={$r[']Buy[/url]"; } $each= abs(intval($r['cmPRICE'] / $r['cmQTY']));   Well, hopefully this is correct and will help you. I thought this out myself, so there might be a chance I'm wrong, but some parts I know I am right. A poll would be added to see your thoughts. Comment || Feedback is welcome. Also, I tried to make it funny for you. :P (Submitted votes cannot be changed!) - Armageddon
  4. I voted Space. I like space, and think it's very creative. So I think a space template would be perfect.
  5. Lmao. Well keep learning, it's quite easy when you know the basics of it, trust me. I did take me around a couple of hours to learn, but can be useful. :)
  6. I myself was reading an article about this. And it may come in handy to you. Very useful -> http://www.alistapart.com/articles/sprites/
  7. I know this is an old modification, but to the creator. Most values don't assign to nothing..
  8. Could you post all the code up please? Also, I think something need's to be added inbetween the empty ",",",.
  9. Nice work here mate. I myself am starting to learn PS(CS4). It's tricky PS, but awesome. Keep the nice work up!
  10. OK. I Am now totally convinced. The engine will be Re-coded now. Only the current files, and around 10 other files will be added. If MWG members are actually interested on helping me on the project, please PM, or add my msn([email protected]). With a recent Modification, or some knowledge of Mccodes. If your a Graphic Designer & can slice, please also contact me. Thanks.
  11. OK. I Am now totally convinced. The engine will be Re-coded now. Only the current files, and around 10 other files will be added. If MWG members are actually interested on helping me on the project, please PM, or add my msn([email protected]). With a recent Modification, or some knowledge of Mccodes. Thanks.
  12. Ah... Thanks Dj. Was looking around internet for awhile, but couldn't find answer.
  13. Hm.. I don't think all that DB Query crap is needed. Might want to use something like this. :)   $mags = $db->query("SELECT `itmname` , `pa_rounds_left` , `pa_rounds` , `pm_id` , `itmid` FROM `players_mags` LEFT JOIN `items` ON `itmid` = `pm_itmid` // Can ==(Equals) be used on Querys, and still be valid? LEFT JOIN `players_ammo` ON `pm_itmid` = `pa_itmid` WHERE `pm_userid` = ".$ir['userid']." AND `pm_itmid` = ".abs(@inval($_GET['WID'])); I don't think all the query is needed like that. But anyway, should still work. :)
  14. Actually, that is a good idea. I think it would be great for people and stuff. Definitely doing that. Thanks Crazy. :)
  15. No problem, and yes absolutely. Nothing is being selected from a/the DB, so the table won't know what is what, or were it is.
×
×
  • Create New...