Yeah, I'm going to have to play around and see if I can do the calculations in SQL.
Thanks for your help.
Just to try and simplify the PHP calculations above, here's what I need for the final results.
The most points for each position.
(1) QB
(2) RB's
(3) WR's
(1) TE
(1) PK
(1) Def
(1) Flex...
Good suggestion. Just running a couple of queries and doing the math here, this looks awesome.
Running the query to select 1 team and sort it DESC by score takes about .12 seconds, do that 11K times and that's around 20-25 minutes.
Running the query you suggested dropped this down to a ~40...
Yes I am :bagoverhead:.
It looks like this.
for($i=10001;$i<11000;$i++){
$winner_info = orderWinners($curr_week,$i);
$winners = implode(',',$winner_info[0]);
$week_score= $winner_info[1];
$sql="UPDATE teams SET week_score= '$week_score', week_winners ='$winners' WHERE...
Hi There,
I have a website that has about 11,000 fantasy football teams in it and I need to hit each one, find out their highest scoring players at each position and save that in a field in the DB.
Currently I have a query that grabs sorts all the players on the team by score DESC, then I read...
Thanks for the replies. r937's query gets me most of the way there, it's not displaying the beer names for the beers without reviews on them, but I will be able to tweak this query to include those when I have a couple minutes.
Thank you, I didn't think to group the results, my understanding...
Hello,
Currently, I have a couple of queries that are taking a couple seconds to process and load the page and I was wondering if you could point me in the right direction to clean this up.
I have two tables that are being accessed over 2 queries right now.
This query grabs all the beer names...
Sorry for the short reply, I am doing this for a side project and am busy at work and trying to just get a reply to stay engaged.
Thank you for your prompt reply and again, sorry about my lack of detail.
I was testing this on a site I am upgrading and it was using an outdated JQuery library...
Thank you for the prompt reply. Here's the error logged in the console when I try this..
Uncaught TypeError: Object function (E,F){return new o.fn.init(E,F)} has no method 'parseJSON'
PostbackSuccess_ShowResultsfunctions.js:37
I
jquery.js:19
I will post my MySQL query that generates the...
Hi there,
I am making an ajax request to a PHP page and returning the results as a JSON array.
Where I am having a hard time is grabbing the specific parts of the array to display on my page.
I'm using Chrome's javascript console and logging to the console, so I can see the returned array...
Thanks Andrew,
Your solution cuts down my time a lot, I've gone from 6.5+ seconds to just under 1 second with your changes..
Also, sorry about the inconsistent data, it's an old DB that has some weird naming between tables and I was trying to make it presentable.
I'll go with this route...
Hi there,
I need some help seeing if I can clean up this query to be faster. Currently, it table about 6.5 seconds and if I can speed it up, I'd love that.
3 tables.
Styles - This table is a list of styles and each of these styles needs to be listed on a page with some other data from the...
Good to hear it was the right choice... I've been doing php/mysql coding for a few years now and never really had a need (or so I thought) for to many JOINs in my statements and I was able to get all the data I needed with specific SQL queries that included multiple tables in the main query...
Hello,
I am having a hard time getting anything to work with Inner Join for the results I am trying to achieve.
I have one table (data) that has the following
id user_id data
1 100 Test1
2 101 Test2
3 100 Test 3
4 121 Hi
5 101 Hello
6 357 Yo
and another that...
Hi there, I am new to jquery and trying to write one jquery function to do multiple things and either what I am trying to do isnt supported or I am doing it wrong, a little help would be awesome.
Here is my function as is and working.
Called by: $("#drop_player").click(onSelectRoster);
function...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.