Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. fenway

    select box

    All I want in the actual text of the mysql query...nothing more.
  2. Oh, I see now -- we need to use the most recent closed status. BTW, why do you have two status flags?
  3. Solved how? There isn't even a mysql query in there!
  4. I'm sorry... I'm quite lost now. Is there a counting issue or a grouping issue? And why should certain rows be excluded? Your sample data doesn't match your output, either.
  5. fenway

    select box

    The query that's causing the error -- I want to see it (not the php code).
  6. Wait a minute, that doesn'twork?
  7. first write a query to find the matches, then worry about counting them....
  8. fenway

    select box

    That's so very exposed to sql injection... echo your query string.
  9. no, i mean: SELECT il.status_date AS sdt, COUNT(i.id) AS cnt FROM issues AS i LEFT JOIN issues_log AS il ON ( i.id = il.issue_id AND il.status='closed' ) WHERE i.status = 'closed' GROUP BY sdt ORDER BY sdt ASC
  10. You need to figure out the "highest" state first, then join back
  11. TLDR.. what's wrong now?
  12. And please don't ever post that much code again.
  13. Get rid of those evil backticks.
  14. INT UNSIGNED should suffice for most tables... are you really going to store over 4 billion records in any given table?
  15. Or write a quick three-liner to do it regardless -- check if magic quotes are on, and then addslahes accordingly.
  16. Sorry, I have no idea what you're talking about. And this was even more confusing. Start again.
  17. LEFT JOIN ... IS NULL might be faster.
  18. Code like that doesn't help at all. What exactly is the problem? Have you echoed your sql statements.
  19. Yikes... look at some dev resources on storing trees in mysql.
  20. ".TCSH OS 10.5 Intel quad" is quite confusing. I assume you're using the tcsh shell (finger -m username will tell you for sure). You can simply search the web for examples.
  21. Plenty of tutorials on this site, too.
  22. This would be much easier if you have a contractors table too... and normazlied as well.
  23. This the standard "groupwise-max" question that has been answered many times over. It's covered in one of the stickies, too.
  24. I don't understand.
×
×
  • 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.