Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Again, you haven't told us what you're trying to -- you're telling us why what you're written doesn't work.
  2. What does 'not working' mean
  3. Besides, when are you forced to use a 'single query'?
  4. Also, why the extra select at all?
  5. Well, you can add 'fake' columns with UNION.
  6. Those queries aren't doing what you think. Post EXPLAINS, and then explain in words what you're trying to achieve.
  7. You're paying for this service -- talk to your provider.
  8. You're new -- I suggest you re-read the posting rules. You can start by not posting your scripts.
  9. NOT IN is evil -- use LEFT JOIN... IS NULL.
  10. MySQL won't skip them -- unless you add them, then delete them -- or specify a value.
  11. Pythagoras works wells.
  12. This isn't a new problem -- but there's no reliable solution. At some point, you're going to have to create a mapping from companyN to your internal naming convention for each product X -- there's really no way about it. If N is small, then even if X is large, deltaX -- the number of products that (a) change names or (b) are added [deleted doesn't count] -- is likely to be small as well. The initial mappings will be painful -- but a multi-pass approach should reduce the workload by about 95%. Afterwards, it's a one-off, which is easy to get a client to do.
  13. Why should we 'just tell you' -- this is site for people to exchange ideas -- not a site to demand answers. If you really don't understand these comments, then this isn't your script. Which means you shouldn't be changing it without understanding how it works.
  14. We can't infer your table structure from *.
  15. Also, that just wastes CPU cycles -- you don't need all those trig functions unless you're using huge distances.
  16. Please recognize that it's called 'auto'-increment -- which means you're not supposed to give it a value. If you are, you've chosen the wrong field -- but I could have told you that from your choice of ZEROFILL.
  17. "SELECT clan1.name AS clan1Name, clan2.name AS clan2Name FROM ".PREFIX."cup_matches AS matches INNER JOIN SELECT name FROM ".PREFIX."cup_all_clans` AS clan1 ON ( clan1.ID = matches.clan1 ) INNER JOIN SELECT name FROM ".PREFIX."cup_all_clans` AS clan2 ON ( clan2.ID = matches.clan2 ) WHERE matches.cupID=$cupID" Should do the trick.
  18. Don't try and roll-your-own F.T. index -- that REGEXP won't work at the end of the column.
  19. That table is already being joined....?
  20. If you want to debug SUMs, drop the SUM/GROUP BY and inspect individual rows.
  21. MySQL's RE capabilities are extremely limited -- though there are some pretty powerful UDFs available as plugins.
  22. If you want to pay, you've come to the wrong place.
  23. And SQL would have produced a syntax error -- which clearly wasn't checked.
×
×
  • 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.