Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ochaos

    Assistance with speeding up a Query/Process

    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...
  2. ochaos

    Assistance with speeding up a Query/Process

    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...
  3. ochaos

    Assistance with speeding up a Query/Process

    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...
  4. ochaos

    Assistance with speeding up a Query/Process

    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...
  5. ochaos

    Need some assistance cleaning up a query.

    Awesome, that does it, thanks again!
  6. ochaos

    Need some assistance cleaning up a query.

    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...
  7. ochaos

    Need some assistance cleaning up a query.

    I just noticed that when typing this to clean it up, ORDER BY in both queries should be ORDER BY beer.beer_name
  8. ochaos

    Need some assistance cleaning up a query.

    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...
  9. ochaos

    Looking for assistance displaying returned JSON array

    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...
  10. ochaos

    Looking for assistance displaying returned JSON array

    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...
  11. ochaos

    Looking for assistance displaying returned JSON array

    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...
  12. ochaos

    MySQL query help - tie in 3 tables data

    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...
  13. ochaos

    MySQL query help - tie in 3 tables data

    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...
  14. ochaos

    MySQL Query to accomplish INTERSECT

    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...
  15. ochaos

    MySQL Query to accomplish INTERSECT

    Ok, I got this. Ended up using a JOIN and it did exactly what I was looking for much more efficiently then a PHP function.
  16. ochaos

    MySQL Query to accomplish INTERSECT

    Sorry, "current" user in this example is user_id 100 Thanks!
  17. ochaos

    MySQL Query to accomplish INTERSECT

    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...
  18. ochaos

    jquery function help - passing variables for textbox id?

    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...

Part and Inventory Search

Back
Top