Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. "a SUM of all sub-account balances for anyone who is a parent" Is that a simply SUM(), GROUP BY, where usr_parent = 0?
  2. fenway

    Mysql Query

    You want INNER JOIN, not LEFT JOIN, since you require a match in both tables.
  3. You need an "=" and a LEFT JOIN.. IS NULL.
  4. "Another DB table"? Which table? How is is related?
  5. Can you give some concrete examples -- no code?
  6. Yes, I see. Well, for each record in your temp table, you'll need to query the other tables to see if there are any matches. If so, use that UID. If not, INSERT, then grab the new UID.
  7. I just meant to combine them in php.
  8. I see dozens of queries and 50K of posted code. How about only posting the offending query?
  9. Sounds like you're linking some score to some other relationships.
  10. FTS is weird and magical -- like dragons. It misbehaves on very small datasets -- this is a known limitation.
  11. You need a third table linking movieID to userID -- preferably with a timestamp, too.
  12. There are lots of reasons to use such a loop -- though I doubt this case is one of them.
  13. Sorry, I don't follow -- why is there a temporary table?
  14. I've told you not to double-post before -- last warning.
  15. How about showing us your table structure and the queries you're running, instead of making us guess?
  16. That's because you're missing a JOIN condition.
  17. I can't find the INSERTs in that code.
  18. Technically, you should be counting in each subquery and then summing.
  19. That's a great way to start.
  20. Echo the actual query.
  21. How many threads can you open on what appears to be the exact same query?
  22. FYI, UPPER() still won't guarantee a case-sensitive match.
  23. And that's why it's important to post "solutions".
  24. Yes, if there's something you can "guess at" for the offset (an ID, value, etc.), that helps a great deal.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.