Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. What do you expect us to do with that?
  2. That's because you interspersed "SET" in between your table joins....
  3. This seems like an order of precedence issue... you'll need to wrap your ORs in parens.
  4. No, I want specific examples in your case... sample records from both tables, what output you are trying to achieve with them, how they relate, etc.
  5. Agreed... pls confirm this isn't DB-related, and I'll move it.
  6. Try without spaces in your field names!!!!!
  7. Yes, I saw... IMHO, table structures don't really constitute something to hide. I'll make a one-time exception this time. Keep discussions to the boards for future reference. Why not simply sort by "numleads/numclicks" instead of "convratio"? Problem solved.
  8. You sure you can't combine that logic? Tell us more.
  9. First, show us the EXPLAIN output of your existing query.
  10. Why not try creating it using the "DELIMITER" way?
  11. I prefer proper JOIN syntax, but that's the general idea... you'll need to convert the select to an update with a SET clause, of course.
  12. Short answer... don't format your output in mysql.
  13. fenway

    select box

    Don't post links to code... no one's going to look at them. "Refreshing" is not a mysql problem... if that's really the issue, but the queries work just fine, then I'll move this thread to the PHP forum.
  14. Maybe we're getting closer... could you elaborate with examples?
  15. Yup... so you have to order using an "inverted" FIELD()....
  16. Just not that that code does NOT deal with the situation where there are other values in your list other than the ones your explicit "rank" -- careful.
  17. Sorry, I give up... I really haven't followed this from the outset. Maybe someone else will be able to understand.
  18. Not easy without a stored procedure of app code... parentID isn't the best way to store this -- check out the stickies.
  19. fenway

    select box

    Sure, why not?
  20. Glad to help... would you mind posting the final working query? You'd be amazed how often this question gets asked around here..
  21. So, what's wrong with that?
  22. That sounds like the typical CLIENT_MULTI_STATEMENTS flag issue in php.
  23. Well, this will retrieve the "desired" rows, correct? SELECT il.* FROM issues_log AS il INNER JOIN ( SELECT issue_id, MAX(status_date) AS status_date FROM issues_log WHERE status = 'closed' GROUP BY issue_id ) AS sub USING( issue_id, status_date ) Shouldn't be too hard to count and join it back to issues table.
  24. fenway

    select box

    Not exactly... that's _still_ php code... echo that string. That's the one that's producing the error message, 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.