

![]() |
![]() |
![]() |
|
|||||||
![]() |
![]() |
|
Welcome to Talk Arcades, the premier forum for arcade webmasters. You are currently viewing our boards as a guest. By joining our community you will be able to make posts, communicate privately with other arcade webmasters and talk advantage of the GameFeed™ Distribution Network for 1-click installation of games into your arcade. Registration is easy, so please join us today! |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Aug 2008
Posts: 270
![]() ![]() |
As a followup to my first thread of improving listGames() function. Here is an improvement to
topPlayed.html, newest.html and categories. This is a little more involved than the other thread, but is worth it in the end. First I will show the stat tests of queries, memory and script execution Default = Vanilla install of Tap, Updated = new queries used. topPlayed.html Default PHP Code:
PHP Code:
newest.html Default PHP Code:
PHP Code:
Categories Default PHP Code:
PHP Code:
find PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
open /templates/[Your Template]/browse.php find PHP Code:
PHP Code:
/includes/engine.php /templates/[Your Template]/browse.php
__________________
Thanks Paul I code for FOOOOOD Your coding errors make me Orgasm LOL Arcade Themes and Mods Sniperz Login with Fb and submit your GAMES ABC Arcade | Youlose | Wicked Games | GirlyCade | Gurl Arcade | Zombie Arcade |
|
|
|
![]() |
![]() |
|
|
#2 (permalink) |
|
phpAS Staff
Arcade Warrior
![]() Join Date: Jun 2008
Posts: 798
![]() ![]() ![]() MarketScore (6)
|
Good call, I wasn't aware that using an outer join in your query could do that much difference.. Learned something new today too!
__________________
![]() -= Check it out: Php Arcade Script =- -= Php Arcade Script Templates: Neon Blue | Neon Green | Neon Pink | Dark Charred | Colorful =- |
|
|
|
![]() |
![]() |
|
|
#3 (permalink) |
|
Senior Member
Join Date: Aug 2008
Posts: 270
![]() ![]() |
Yeah, the outer joins are useful, you just have to make sure you select the fields you want and not just use * as that would be too much overhead and a waste of resources. Here were just pull the game fields and the catname.
So its much lighter than pulling the query on every record. if you dont want to use a join, you could query the cat DB once, then from the array, pull back the category name by using the cat id as the array index. As the category table is small then the array wouldnt be too heavy. Theres more than one way to approach it, I just prefer joining and let mysql do the work. Caching the SQL would be even better :P
__________________
Thanks Paul I code for FOOOOOD Your coding errors make me Orgasm LOL Arcade Themes and Mods Sniperz Login with Fb and submit your GAMES ABC Arcade | Youlose | Wicked Games | GirlyCade | Gurl Arcade | Zombie Arcade |
|
|
|
![]() |
![]() |
|
|
#4 (permalink) |
|
phpAS Staff
Arcade Warrior
![]() Join Date: Jun 2008
Posts: 798
![]() ![]() ![]() MarketScore (6)
|
Indeed, another way to do it would be sub queries which I've been a fan of for a while.
http://dev.mysql.com/doc/refman/5.1/en/subqueries.html It would be interesting to see if outer join or sub queries are faster if you are up for a challenge ![]()
__________________
![]() -= Check it out: Php Arcade Script =- -= Php Arcade Script Templates: Neon Blue | Neon Green | Neon Pink | Dark Charred | Colorful =- |
|
|
|
![]() |
![]() |
|
|
#5 (permalink) |
|
Senior Member
Join Date: Aug 2008
Posts: 270
![]() ![]() |
Hi Jan,
Im not the biggest fan of subqueries as you cant pull fields from the subqueries table i.e catName you can only really compare the data. Unless im mistaken. But here is the result with out the catName pulled back on the homepage through listGame PHP Code:
PHP Code:
PHP Code:
__________________
Thanks Paul I code for FOOOOOD Your coding errors make me Orgasm LOL Arcade Themes and Mods Sniperz Login with Fb and submit your GAMES ABC Arcade | Youlose | Wicked Games | GirlyCade | Gurl Arcade | Zombie Arcade |
|
|
|
![]() |
![]() |
|
|
#6 (permalink) |
|
Arcade Elite
![]() ![]() |
Now this is what I like to see and has been missing for some time. I don't care whose script this is, posts like this help make us all better script writers. Thanks for your renewed efforts Paul.
__________________
![]() Military Combat Games - come check my new website out!!! - The Casino Arcade - DMSOFT-WY.COM - Webmaster Blog Site |
|
|
|
![]() |
![]() |
|
|
#7 (permalink) |
|
Senior Member
Join Date: Aug 2008
Posts: 270
![]() ![]() |
@dmm yes, sharing and comparing always helps improves ones skill set. Im always learning as well as its always ongoing.
Im always open to helping out our community.
__________________
Thanks Paul I code for FOOOOOD Your coding errors make me Orgasm LOL Arcade Themes and Mods Sniperz Login with Fb and submit your GAMES ABC Arcade | Youlose | Wicked Games | GirlyCade | Gurl Arcade | Zombie Arcade |
|
|
|
![]() |
![]() |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trade Arcade Pro Speed Up/Reduce 80-90% Query Overhead On Average | lfhost | TradeArcadePro | 5 | 06-21-2011 11:20 AM |
