Jump to content
MakeWebGames

Lithium

Members
  • Posts

    1,099
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Lithium

  1. Re: Help with Instant Credit For paypal donaters? yes... use the search feature available... :|
  2. Re: Important Security Issue For All McCode Owners !   and changing a bit of a quote from a classic movie... "Who needs friends when you got enemies?" (Original quote: "who needs reasons when you got heroin?" - Trainspotting)
  3. Re: Important Security Issue For All McCode Owners ! Makaveli: i'm no expert and quite far from that, but it does amuses me and i mean a LOT, seeing those situations. I have fallen and i believe any programmer has too, a few times on exploitable code by ourselves, it happens. the way you deal with it... it is what matters, i don't care if someone found an exploit on my game, i care yes, is to learn how it was done and what i need to do to avoid it. People should learn with their own mistakes!
  4. Re: Important Security Issue For All McCode Owners !   And did i say you created? or mdshare? i'll place it again to see if you can read better this time someone who actually READS posts
  5. Re: Important Security Issue For All McCode Owners !   Hmmm someone who actually reads posts :) @Makaveli: as for the surprise you have... i wouldn't be that surprised when 95% of the game owners/coders are kids that just learned a new language and they think they know it all just because they were able to install a game and make a few changes to it!
  6. Re: Important Security Issue For All McCode Owners !   Searching for a fix when Makaveli already told what to do? @Makaveli: you only found those out these days? without wanting to be mean... but those are old news!
  7. Re: [v2 $varies] Einey's Mod Shop (Read the store info before posting)   Sorry if my math is this bad, but, individually you sell one copy of each mod... so far so good! But then... you say you sell 2 copies of the "motherload bundle" Meaning that in fact you are selling 3 copies of each one... so why posting "1 copy" when that is plain missleading? And don't come and tell that "individually" you sell only one copy... Also, i have to agree that you should post screenshots, or at least have a demo account for those willing to check the mods live
  8. Re: [v2 $varies] Einey's Mod Shop (Read the store info before posting)   Subscribe!!!
  9. Re: Crons, Timestamp or none?   Not quite like that Bama ;) You can start an event at a fixed time, making the event trigger at the correct time like 00, 05, 10, 15 etc. How? Like this...   CREATE EVENT gettime ON SCHEDULE EVERY 1 MINUTE START AT '2009-04-01 00:00:00' DO INSERT INTO test.table values ('',current_timestamp)   This allows to run the event at every minute starting from that date. If you don't specify the START, it will be recurring, according the time that you enable the event with the "set global event_scheduler = 1;" instruction.
  10. Re: Crons, Timestamp or none?   A few, and i must say that it is definetly "the future" if properly applied. I am also already used to this line of updating, though not on MySQL, where best practices do suggest this is the best method. Also, when changing servers, you don't need 2 or more operations, you simply backup the db, as events are associated, they come along, saving you the hassle of "redoing" all the cron jobs :)
  11. Re: Crons, Timestamp or none? I've placed 2 examples... 1 for minute 1 for week... so read a bit and figure out the rest, as i said, semanthics is pretty much just like the normal SQL except for a few bits which are pretty much easy caught to who is used to handle these crons and the SQL statements. I'm pretty much certain that whoever reads this article, is capable, without further reading to drop an example on how to refill any stat :)
  12. Re: Clone ermmm... what's so special on that HOF ? :|
  13. Re: Crons, Timestamp or none? Nop, and properly edited... no game needs crons!!!
  14. Re: Ip logs   hint *try looking in the file where that messages show up* (this was a subliminal message)
  15. Re: Ip logs so let me rephrase it... besides the output giving absolutely nothing, you think people will just guess what is the code behind it and give you the fix?
  16. Re: Ip logs hmmm prolly someone can if you post the code, right?
  17. At first, let me give a small intro about myself. I am Pedro, born, raised, and living Portugal. I work in IT related jobs since 93. Currently i work as a sysadm at one of the major ISP's around here and am in charge of near 500 servers, with a few different flavours. My knowledge on programming is limited, and i do not intend at this stage of my life, to increase it further more, only on a job needed base and that's all. As of DB's i work mainly with Oracle and SQL. And this is the reason that lead me to write these lines, not to teach but to give a tiny small approach on MySQL capabilities. As the title says, the use of crons is the most widely use because mainly the limitations of the offered DB solution by the hosting companies (MySQL). What if you could create jobs from inside the DB itself to make the work that usually you would be doing by the use of crons or even timestamped events? Well as of MySQL 5.1 you can do it. Jobs on MySQL are simply called events, and they work EXACTLY the same way as your crons. I will ilustrate with a small example, but remember that only MySQL 5.1 or higher is capable to do this. (xampp releases already have MySQL 5.1.30 (v1.7.0))   CREATE TABLE IF NOT EXISTS `table` ( `tID` int(11) NOT NULL AUTO_INCREMENT, `tDATETIME` datetime NOT NULL, UNIQUE KEY `tID` (`tID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;   And after CREATE EVENT gettime ON SCHEDULE EVERY 1 MINUTE DO INSERT INTO test.table values ('',current_timestamp)   Now let's enable the event set global event_scheduler = 1;   As you can see the semanthics is very similar to what you are already used to... And 9 minutes later SELECT * FROM test.table 1 2009-03-28 18:12:17 2 2009-03-28 18:13:17 3 2009-03-28 18:14:17 4 2009-03-28 18:15:17 5 2009-03-28 18:16:17 6 2009-03-28 18:17:17 7 2009-03-28 18:18:17 8 2009-03-28 18:19:17 9 2009-03-28 18:20:17   So far so good, but you might be asking... what limitations am i going to find? You will not be able to have $vars stucked there, as it only works with plain db calls, meaning that if you are thinking on using it let's say on a game engine like mccodes... you will need to edit it a lot. I'll give a practical example on a query i have running on my own game that is using events (yes this is the names for mysql jobs). I have redrawn the bank system to it's own table and have the event running once a week, and you might be asking how do i make calculations on interest right? i have an extra field that shows the users bank interest (my system allows about 7 different interest rates) so the only thing i need is to call the field to make interest calculations and the query would be set like this.   CREATE EVENT bank_interest ON SCHEDULE EVERY 1 WEEK DO UPDATE uBANK SET bMONEY = bMONEY + floor( bINTEREST * bMONEY / 100 ) WHERE bMONEY > 100   Hope this is usefull, and if you need any assistance, feel free to ask, even if you think "its a dumb question", as someone here told me a few days ago "everyone is born naked" ;) And finally... the resource on MySQL website can be found here... http://dev.mysql.com/tech-resources/art ... vents.html
  18. Lithium

    Input buttons

    Re: Input buttons that javascript tip is a decent option, though i'm just wondering how much trouble will i get to make it working properly! hehe thx Floydian :)
  19. Re: MySQL Version   Agree with you on that, but as for MySQL, version 5.1 is out for... over 3 years now? Currently on v5.1.32 (stable/production) if i'm not mistaken and v6.0 out for 2 years (though development stages only). And yes, version 5.1 as proven to be as stable and secure as it should be expected. :)
  20. Those of you that have online sites, please help out on this survey, as i would like to know how the general hosting companies are going on the updates, and towards a few features that i would like to demonstrate, though usefull only if most hostings run certain versions!
  21. Re: NO DONATION.. config.php most likely is the file you need to edit
  22. Re: Hospital/Jail Time v2   rand() generates a random value in between the 2 elements so lets say it generates a result of 30 floor() rounds down decimal values now lets say you are level 4 so 4/8 = 0.5 now floor(0.5) will return 0 that is going to produce a final result $hosptime = 30+0 $hosptime = 30
  23. Re: Creating New Stat Problem ... without seeing the code... yes! your post is too vague for someone to give you a fair explanation on what is going
  24. Re: Pimp Whores Script if (purchase + totalhoes > 10) { you can only buy more 10-totalhoes hoes more; exit }
  25. Re: Major error please help me fix this seems you still need to learn what "Internal Server Error" stands for... http://www.checkupdown.com/status/E500.html
×
×
  • Create New...