Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. I should probably add that WHERE `date` > CURDATE() - INTERVAL 7 DAY would likely have better index utilization. BTW, why are you storing time separately?
  2. Better yet, actually show us the query.
  3. BETWEEN CURDATE() - INTERVAL 7 DAY AND CURDATE()
  4. Again, when you don't store dates properly, date operations become painful.
  5. I'm confused... why combined the two parts just to make it hard to query?
  6. Ah, I see. You need to add this expression to the column list: SELECT * ,CONCAT(USERS.`state`, LOCATION.stateabbreviation) AS state FROM USERS, LOCATION WHERE user_ID = colname AND USERS.`state` = LOCATION.stateabbreviation
  7. Show us the queries you've tried and what they produce in error.
  8. Again, you can do the same in mysql... usually the easiest way around this is to add to the where clause the current value of 'gold'.
  9. I don't understand what you're trying to do...but you can't use a column alias that way.
  10. why not "gold = gold + 100"?
  11. That's a mighty racist database you're working on.
  12. Stored procedures can do this... but why?
  13. That's because you have a space between CONCAT and the open parenthesis.
  14. How is this stored in the db?
  15. That's why always debug in textareas.
  16. As long as the depth is fixed, this approach will work just fine for most cases.
  17. I see... why? It's always going to be equal to auto-inc value.
  18. No, you've set it up correctly.
  19. Unless I've misunderstood, you asking how to serve up files from mysql.
  20. I think you've misunderstood -- there is no reading from the table in the aforementioned case. I was agreeing with the latter statement.
  21. Well, if what you're saying is true, they're not the same... use === to test this.
  22. Denormalization is really only required for seriously large databases with crazy load requirements.
  23. And mysql does precisely this if you happen to have a multi-column key and specify only such columns in the select list and where clause.
  24. Right out of the refman, too.
  25. From where?
×
×
  • 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.