Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Just reading this long thread now... where do things stand?
  2. I'm not sure what you mean... but you'd need to re-cast the field to DATETIME without seconds -- or, equivalently, round to the nearest minute (with a MOD 60).
  3. What makes you think fulltext finds parts of words?
  4. Not really. You need to use a LEFT JOIN... IS NULL... but we'll need the table structure to be sure.
  5. Yes... the really the only "valid" approach, IMHO.
  6. You'd need an UPDATE statement, but yes, you can use the SET... the way you described above.
  7. Yes, all those extra parens do nothing in this case.
  8. What is the "daily" table? Should a client have two records or not? It sounds like you'll need to get distinct daily rows first.
  9. What have you tried so far? Sounds like a JOIN would work easily...
  10. I'm not sure I understand... if you JOIN the tables, you can iterate through the result and add a separator whenever you'd like.
  11. First, you should really prefix your column names with table aliases in your where clause, too. Second, you can't really filter properly on a LEFT JOIN'ed table field -- move this condition to the ON clause, if you want to.
  12. Your "where condition" is basically a LEFT JOIN...IS NULL.
  13. You need to JOIN these tables... SELECT c.*, b.* FROM components AS c INNER JOIN bom AS b ON ( b.number = c.part_num )
  14. You sure you're updating the correct row?
  15. Variables? Huh?
  16. You can use the AT scheduler...
  17. fenway

    search help

    You just need to add the word "EXPLAIN" in front of your query...
  18. And the EXPLAIN on the corresponding query on the view? Index usage is very wonky with VIEWs.
  19. I still don't understand what you're trying to achieve... since it's all in the same table, you could get the same result with an OR -- and without 4 joins. Please clarify.
  20. You can also do this in the ORDER BY clause directly...
  21. Did you run the EXPLAIN on the underlying select?
  22. Why can't you put this in the having clause too?
  23. Oh my... please don't do that. Do you want a single record or multiple records?
  24. You may also want to enforce max > min.
  25. Please don't post your entire code. Echo $sql for us. And all mysql_error() to check for anything wrong. Then add a WHERE clause, because otherwise you're updating every record in your table.
×
×
  • 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.