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. This has nothing to do with mysql, or even php.
  5. Also, why the extra select at all?
  6. Well, you can add 'fake' columns with UNION.
  7. Those queries aren't doing what you think. Post EXPLAINS, and then explain in words what you're trying to achieve.
  8. You're paying for this service -- talk to your provider.
  9. You're new -- I suggest you re-read the posting rules. You can start by not posting your scripts.
  10. NOT IN is evil -- use LEFT JOIN... IS NULL.
  11. MySQL won't skip them -- unless you add them, then delete them -- or specify a value.
  12. Pythagoras works wells.
  13. 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.
  14. 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.
  15. We can't infer your table structure from *.
  16. Also, that just wastes CPU cycles -- you don't need all those trig functions unless you're using huge distances.
  17. 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.
  18. "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.
  19. Transact-SQL.
  20. Don't try and roll-your-own F.T. index -- that REGEXP won't work at the end of the column.
  21. That table is already being joined....?
  22. If you want to debug SUMs, drop the SUM/GROUP BY and inspect individual rows.
  23. MySQL's RE capabilities are extremely limited -- though there are some pretty powerful UDFs available as plugins.
  24. If you want to pay, you've come to the wrong place.
  25. 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.