Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Well, then maybe someone else will step in -- if you can't confirm that the mysql query return the correct recordset, I'm afraid I can't help you in terms of the php.
  2. Maybe I'm not being clear... ALL mean "no criteria" -- there is nothing to determine.
  3. You have two choices: 1) get the results with OR, then filter using HAVING and COUNT(). 2) INNER JOIN in the table to itself, once for each term, and then the only resulting records will have all the terms.
  4. You'll need to JOIN those tables.
  5. Well, there is a BETWEEN operator.
  6. Yikes.. why are there no keys on any table?
  7. Actually, since mysql allows NULL in uniquely indexed columns, you can still ensure only one active record at any time.
  8. Sad but true... it's really the UNIQUE key that's the issue.
  9. I mean demonstrate that simple queries work.
  10. What's eclipse? Anyway, if the query is correct, it sounds like you have php syntax issues.
  11. That's pretty much the only way to do it... as for the slowness, I'd have to see EXPLAIN output.
  12. What do you have so far?
  13. Sorry, TLDR. Anything simpler?
  14. That's pretty much the only way.
  15. It sounds like you need to determine if the user has specified the criteria or not
  16. Then it sounds like you need to query the stops table, not the loads table.
  17. I don't know anything about php output... does the query produce the expected result?
  18. Well, you can use SUM() and IF() to roll-your-own counter.
  19. I don't believe there's anything in those tables... prove it.
  20. OK, that's quite enough. Keith has provided you with the sql solution -- if you're having issues coding php scripts, this is the wrong board. I've moving it to PHP help.
  21. I definitely hear what you're saying -- I've tried to tackle and workaround this issue many times. My personal favourite involves an "activity" column -- only one record is ever "active" at any given time -- problem solved.
  22. use SHOW GRANTS to find out what grants that user actually has.
  23. fenway

    Join Help

    You need a LEFT JOIN... IS NULL query.
  24. You need to combine MAX() with GROUP BY.
  25. This is a php question -- just choose other first.
×
×
  • 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.