iSOS Posted February 24, 2010 Posted February 24, 2010 Hi, I did this a little earlier, I've not tested fully so please let me know of bugs ect. Screenies: http://yfrog.com/i3auctionnonep http://yfrog.com/7hauctionaddp http://yfrog.com/7hauctionaddp http://yfrog.com/5nauctionp http://yfrog.com/5ibidp Features: Buy It Now function Time Selection Bid Ran of timestamps SQL: [mysql]CREATE TABLE IF NOT EXISTS `gAuction` ( `ID` int(11) NOT NULL auto_increment, `SellerID` int(11) NOT NULL, `ItemID` int(11) NOT NULL, `CurrentBid` int(11) NOT NULL, `BuyNow` int(11) NOT NULL, `Time` varchar(30) NOT NULL, `TimeLeft` varchar(100) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;[/mysql] [mysql]CREATE TABLE IF NOT EXISTS `gAuctionBids` ( `ID` int(11) NOT NULL auto_increment, `aID` int(11) NOT NULL, `BidderID` int(11) NOT NULL, `CurrentBid2` int(11) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;[/mysql] Auction.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open Header.php & find the $bgcolor variable & add underneath. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open inventory.php & find [Sell] Add next to it: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Open global_func.php & add. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And that's it, let me know of any bugs I did this quickly so have no idea if there are any. Quote
Casanova Posted February 24, 2010 Posted February 24, 2010 Looking very goood Zedd, Impressive. (I can't test it out right now, However when my connection stops being defiant i'll surly give it the once over) - Casanova. Quote
Zero-Affect Posted February 24, 2010 Posted February 24, 2010 MTG's function looks interest, oh the mod.. lol looks good mate. Quote
iSOS Posted February 25, 2010 Author Posted February 25, 2010 MTG's function looks interest, oh the mod.. lol looks good mate.Lol, thanks. :) Quote
jds137 Posted February 25, 2010 Posted February 25, 2010 Looks great, I needed this. How secure are they? Quote
iSOS Posted February 25, 2010 Author Posted February 25, 2010 Looks great, I needed this. How secure are they? What do you mean? - The file as a whole? - Or just auctions & the effect they would have on your game? The file as a whole is secure yes & no bugs have been reported as of yet. Quote
Jordan Palmer Posted February 25, 2010 Posted February 25, 2010 Wow, I can finally use this script without having to recode it. Thank's zed =] Quote
Sethenor2 Posted February 25, 2010 Posted February 25, 2010 Tested and works well nice one mate :thumbsup: Quote
iSOS Posted February 25, 2010 Author Posted February 25, 2010 Wow, I can finally use this script without having to recode it. Thank's zed =] Lol, no problem. Tested and works well nice one mate :thumbsup: Sweet!, thanks for letting me know. :) Quote
rulerofzu Posted February 25, 2010 Posted February 25, 2010 I had an issue with the header code but possibly my test site. Could be best to use the item add function though anyway. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
iSOS Posted February 25, 2010 Author Posted February 25, 2010 I had no idea "item_add" existed so, thanks. Was it the queries giving the problem? Quote
rulerofzu Posted February 25, 2010 Posted February 25, 2010 Yeah ive got an extra column in my inv table which gave a column count mismatch so nothing with your actual code as suspected. Quote
Equinox Posted February 25, 2010 Posted February 25, 2010 I I had no idea "item_add" existed so, thanks. Was it the queries giving the problem? I suggest using it, Zed.... It automatically merges the items, I think 8| Looking good though :) :thumbsup: Quote
Jordan Palmer Posted February 25, 2010 Posted February 25, 2010 I I had no idea "item_add" existed so, thanks. Was it the queries giving the problem? I suggest using it, Zed.... It automatically merges the items, I think 8| Looking good though :) :thumbsup: Nope, MCCode standard one doesn't merge, I don't think so anyway, I've edited mine Quote
SHAD Posted February 25, 2010 Posted February 25, 2010 I havent found a problem with it so far, You made a fantastic mod Zeddicus mate, Good Work. :thumbup: Quote
iSOS Posted February 25, 2010 Author Posted February 25, 2010 I havent found a problem with it so far, You made a fantastic mod Zeddicus mate, Good Work. :thumbup: Sweet thanks,. :) Quote
rulerofzu Posted February 25, 2010 Posted February 25, 2010 I I had no idea "item_add" existed so, thanks. Was it the queries giving the problem? I suggest using it, Zed.... It automatically merges the items, I think 8| Looking good though :) :thumbsup: Nope, MCCode standard one doesn't merge, I don't think so anyway, I've edited mine Well I havnt changed mine and it merges the items 8| Quote
Jordan Palmer Posted February 25, 2010 Posted February 25, 2010 I could be wrong then, Not sure, I've not used standard MCC for quite a while, Quote
fbiss Posted March 1, 2010 Posted March 1, 2010 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: Quote
iSOS Posted March 1, 2010 Author Posted March 1, 2010 No I wouldn't say so myself, with every user only aloud 1 auction at any time, even with 10k auctions, that means there's 10k players minimum, so "$ir" and any other of the predefined variables are pulling *alot* more data from the database than the auction query would ever have. Of course it could be done with the use of a cron, But from the usability of this particular modification a time-stamp is best. (And it would have to go in a 1 min cron anyway) Quote
fbiss Posted March 1, 2010 Posted March 1, 2010 $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. Quote
Equinox Posted March 1, 2010 Posted March 1, 2010 $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. I think the global $ir shouldn't even exist, even if McCodes had correct indexation - it's still slower than it could've been done (even if it's only a few milliseconds) And just so you know, Zed - you could've mixed <span> with :) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. To You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Nothing special. I think this is a great modification and Zed has done well, I think the way it's coded is perfectly fine for a small and large McCodes game :P Quote
fbiss Posted March 1, 2010 Posted March 1, 2010 I think the global $ir shouldn't even exist, even if McCodes had correct indexation - it's still slower than it could've been done (even if it's only a few milliseconds) Nothing special. I think this is a great modification and Zed has done well, I think the way it's coded is perfectly fine for a small and large McCodes game :P 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.