Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. You mean a UNION? You can't join tables that way.
  2. You definitely don't want FLOAT... use DECIMAL.
  3. I've addressed the problem in your other duplicate thread.
  4. You've interspersed your SET in the middle of a JOIN!
  5. You can use the substring function.
  6. This is just like your other post... there's no "first" table.
  7. Where's the first table?
  8. The "silence" means that everyone has a real job, too.
  9. The user->calendar issue should be easily addressed with a lookup table; as for the dates, is it always full weeks?
  10. How is it that you don't have a backup of your database anywhere.
  11. Where's the mysql part of the question?
  12. Your computer == your site? InnoDB Tables? MyISAM Tables? What's in the actual directory?
  13. fenway

    Query help

    You need to use HAVING totalcogs>10000 -- you can't check the result of aggregate functions in the WHERE clause.
  14. You could use the readonly attribute.
  15. You mean to pay you again? If it's been that long, their site is out of date anyway... and yes.
  16. That will work too... but it's a something_date, right? Like registration_date, confirmation_date, purchase_date, etc. Just make it descriptive and you won't ever run into this issue.
  17. I encounter this all the time -- I have systems that have been running the same scripts for 8+ years... sure, it's ugly, but it gives you a reason to convince the cilent to revamp their website.
  18. That doesn't make sense in the general case. All buttons have "values" -- that's the only way to specify their label. However, you wouldn't want all "unclicked/unpressed" buttons to be submitted as successful name/value pairs, right? Just because you expect it to be submitted doesn't mean the browser has been to psychic -- and spec doesn't require it. As for the submit-on-enter argument, that's another can of worms entirely. You want a single submit button to be treated as a magical auto-valued auto-clicked button if and only if it's the only button in the form... that's what the spec doesn't agree with. All buttons are created equal.
  19. The easiest way to get around the reserved keyword issue is simply to have an underscore in your column name. Good luck!
  20. Don't worry about denormalizing your tables until much later.
  21. Yes, but don't. Never learned php -- and self-taught re: mysql. That's too bad -- you can use a CASE statement to UPDATE all 12 months at once, and then copy over the raw date into the new field.
  22. Unlikely... that's not a correlated subquery (check EXPLAIN), so it's equivalent to using a derived table.
  23. I really hope you're not using all of those reserved keywords for your column names ;-( You can simply use an update statement: UPDATE yourTable SET theDateField = CONCAT( year, '-', month, '-', day, ' ', hour, ':', minute, ':', second )
  24. You can use MODIFY and then you won't have to specify the column name twice.
  25. There wasn't a change in the ON clause, but rather a chance in the precedence of the comma operator. Simply wrap parens around the tables "around" the comma, and you'll mimic the old behavior.
×
×
  • 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.