Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. WHERE yourDateTimeFile < NOW()
  2. Then don't enable the rollovers until page load is complete...
  3. Not really... define "random".
  4. No you don't. Don't even try. As toplay said, DATE_FORMAT() can make it look however you desire for output.... don't corrupt the input.
  5. You can't undelete from InnoDB... it's not that kind of log file. And you probably shouldn't be connecting with a user that has delete perms.
  6. Everyone seems to asking this question lately... you can't search across table easily... UNION the search results from each table.
  7. You need to use Date_Saved - INTERVAL 1 MONTH.
  8. fenway

    Select bitmask?

    How would you design such an index? It's like trying to index the 3rd and 6th letter of a CHAR field. 40 rows is a bad idea... bitmasks are a bad idea.
  9. Why you need to change the column order.
  10. Then it must be running the LIKE query for every table... easy to automatically generate that from the schema... but "instantly" probably has to do with the amount of info in the DB. I've never heard or seen this feature.
  11. OK... so you need two queries for the first 2 sections. As for the date, like I said before, use a proper DATE field, and convert your input into the standard YYYY-MM-DD format.
  12. Didn't I just answer that? The "type" column.... see here.
  13. Sort of... you can run a fulltext query first, and then use those results as the input for the LIKE.
  14. Smells like a prepared statement, but not quite there yet.
  15. That's what I thought... dates are string literals, wrap in single quotes.
  16. Missing quotes? Echo the $updateSQL.
  17. The "type" column, no?
  18. Fulltext doesn't do numbers very well.
  19. First, it's easier to read -- which means easier to debug -- really hard to miss a JOIN condition this way. Second, it "forces" the optimizer to pick the right conditions for the JOIN.
  20. In EXPLAIN, look for "ALL" or "INDEX"... rewriting everything as proper JOINs often helps too.
  21. FROM recurring_invoice_products INNER JOIN products ON ( products.id=recurring_invoice_products.product_id ) INNER JOIN product_types ON ( product_types.id=products.product_type_id ) WHERE end > NOW()
  22. Not really... you can figure it out with EXPLAIN one by one, or run a query then check the counter, or hope that they get pulled into the slow query log (usually 100K of rows examined).
  23. CASE will work too -- nicely done; btw, I would suggest proper join syntax.
  24. It shouldn't work... it shouldn't even be allowed. Didn't really answer my question, but oh well. It works. Also, don't understand why you say it shouldn't be allowed. Basically, I don't understand where you're coming from...please elaborate (if you want). There's no reason to do so -- just like trying to fiddle with the auto-increment counter. It means you're trying to do something you should not ever need to do.
  25. Ask for SHOW CREATE TABLE and make sure that you're right.
×
×
  • 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.