Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Your if() is retrieving rows, then the do/while is retriving rows... don't do that. A simple while loop will suffice.
  2. What is your table structure?
  3. Don't the transactions have a date?
  4. LAST? What is that supposed to do?
  5. Yes... STR_TO_DATE.
  6. That's called replication.
  7. You can use AVG() like COUNT()... but still, having a month column isn't ideal.
  8. That is the sample code... and it's TABLES. I suggest you take a closer look at the refmac.
  9. SHOW TABLES will get you the listing... the other question you have is a php issue.
  10. Related? You mean you need the LAST_INSERT_ID?
  11. I've always used "ORDER BY FIELD( myField, ...options-in-reverse-order... ) DESC, myField", because it's more robust -- alphabetical isn't always desirable. The IN clause just a boolean.
  12. You can use DATE_FORMAT() to get any piece you desire -- don't ever split up the date into pieces.
  13. First, why all the parens? Second, that's impossible to read... and third, what's the question?
  14. You're storing just the year?
  15. You're talking about vertical partitioning... that's an advanced technique.
  16. That's because that's not valid syntax... try INSERT INTO a (a) VALUES('aaa');
  17. mysql has some backup scripts.
  18. Ugh... mysql has a period function, you should store your dates properly.
  19. I'll make my usual suggestion of building an array.
  20. Not really...
  21. Try xaprb's MySQL Toolkit (a.k.a. Maatkit).
  22. I have no idea what this means.
  23. FULLTEXT indexing supports this type of thing.
×
×
  • 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.