Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Aliasing is all but free... though it does give the parser a bit more work to do.
  2. fenway

    Query Help

    Well, you can use OR or a UNION.
  3. fenway

    search help

    That's not a query, that's php code. And what does "not work" mean?
  4. Sorry, I have no idea what you're talking about. Give an example of what you would call a "check number".
  5. Are you using persistent connections?
  6. fenway

    Performance

    If you're not actually profiling these, it's meaningless.q
  7. Why not link the review to the a UID in the many-to-many Business<=>Location.
  8. I see lots of php code, a single mysql_query() call, and no actual query.
  9. Sorry, I thought your 2nd output block was the table structure -- my bad. This is called a "cross-tab" -- and you can easily pre-generate the query from the max # of laps.
  10. And don't post your entire script.
  11. No: ORDER BY Flagged DESC, Redeemed ASC, Field(AccountType ,'1 Month','2 Month','1 Year','2 Year')
  12. So what?
  13. Yes, storage is worse. Yes, comparing this value to another number is slower. Yes, MySQL will let you do it. But don't.
  14. Actually, it's quite illogical to store a number as anything but a number.
  15. This has nothing to do with FULLTEXT.
  16. Yup... as long as there are no other values for AccountType, that will work -- a non-match will return 0, so it gets more complicated.
  17. If you're still having trouble, this thread really should be in the PHP Coding Help forum... let's wait and see.
  18. I'm not sure I follow.. you don't want to select them, or you want to delete them?
  19. Yikes... stop posting all that code without code tags. And give people on the boards a chance to answer first. Don't alias any column that doesn't need to be different (i.e. don't collide). The table doesn't come through into the column name. INNER JOIN and "JOIN" are synonymous. And DISTINCT is not a function.
  20. And that's precisely why you should normalize your tables.
  21. You should just use ORDER BY FIELD() instead.
  22. (a) column1 + column2 + column3 + column4 + column5 AS sum.... ORDER BY sum DESC (b) ORDER BY ( column1 + column2 + column3 + column4 + column5 ) DESC
  23. Sounds like you want a simple 3-table join.
  24. No reason why you can't (a) add them and order by the alias or (b) just order by the expression.
  25. Post the table structure... should be as simple as a count90.
×
×
  • 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.