Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Or the related stickies.
  2. Agreed... a LEFT JOIN can always find empty orders. I never throw away information.
  3. No FKs with MyISAM engine... you need InnoDB.
  4. Well, i don't see an insert statement... that might help.
  5. That would be the other way... that's basically an SP, in app code.
  6. Yes, that does make sense. So why not simply UNION the two result sets? I feel like I mentioned that before...
  7. Now wait just a second -- it's not "retarded" at all. MySQL doesn't even look at the column list until the final steps of statement processing -- which is why you can't use column aliases in the WHERE clause. Since the aliasing is performed in a single-pass, there's no possible way to get the alias of an alias -- which is exactly what you're asking for with "convratio". Think about it for a minute, and it should make sense why you can't do it. As for your question about the same expression appearing twice, the optimizer should pick that up -- unless it's in a dependent subquery, and then all bets are off. Furthermore, there is absolutely no reason why you can't just get the ratio in php and add it to the column list. The other option is simply to actually derive convratio as the ratio of two subqueries in the column list... but I can't imagine that would be faster... Hope this clarifies things a bi.
  8. Well, you can always find them later... depends what you're doing with them.
  9. Well, you can do it the "lazy" way, and simply use IN() with HAVING/COUNT().
  10. Why bother? Just leave it there...
  11. Also, please stop posting entire scripts... it's not helpful.
  12. What does that even mean? Syntactially, they're fine, but that doesn't mean that they run on the correct data. You can use "LIMIT 0" to check syntax.
  13. What are you trying to do?
  14. Hope you're using transactions...
  15. Echo the raw query string... that looks like printf().
  16. What error? Show us the raw query string.
  17. When the last time you saw a URL > 255 chars?
  18. Basically, you'll need to make sure that the user has all of the required awards... mysql doesn't handle "lists" as you would expect. So you can either compare arrays in php, or run a more complex DB query that will tell you exactly.
  19. Aspell dictionaries are GPL'ed.
  20. Wait... why are storing locN fields in a single table?
  21. Please read the stickies -- there a link to a dev article of hierarchichal data.
  22. Where's the DB part of the question?
  23. Did you actually substitute your user name in the example?
  24. First, post the raw query string. Second, define "not working". Third, post the error message.
×
×
  • 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.