Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Shouldn't be.
  2. If there are matching rows, it shouldn't matter -- but you can't leave the group by, you'd need to derive them both.
  3. I don't understand this "every minute" requirement, nor the 70 x 2 restriction. Can't you insert all 70 at once/
  4. No, don't create another db. You didn't find inserts in the slow_query_log.
  5. Post some of the file.
  6. Well, I suppose it should be flipped -- derived table should be first, and then LEFT JOINed to the details, in case there aren't any. But that begs the question -- are sure that there are matching rows?
  7. Yeah, I was thinking in swapping mysql keywords for the word ERROR just for fun.
  8. :-\ But ANDs are higher than ORs, so the way I have it should be fine. I sincerely hope you don't rely on the arbitrary order-of-operations that way -- you should be able to add an arbitrary new expression without breaking everything. Add the 4 characters, you'll thank me later. Order-of-operations shouldn't exist.
  9. Either you're a web developer or a sysadmin -- doing both is dangerous -- you're unlikely to be an expert in both (@gizmola - present company excepted), so something's going to suffer. And your server being compromised is much worse.
  10. I don't know anything about your objects -- all I know is that you need to retrieve all of your records, and all of the fields, in one query -- how you process them is really up to you.
  11. What loop? Get back all of the fields, all of the time.
  12. Yes, but use parenthesis or your ORs and ANDs won't work.
  13. SELECT `t1`.`id`, `t1`.`filename`, `t1`.`filegrade_id`, `t1`.`percent_id`, `t2`.`process` FROM `proposal_files` AS `t1` JOIN `prop_file_processes` AS `t2` ON ( `t1`.`process` = `t2`.`id`) INNER JOIN ( SELECT a.filegrade_id, a.file_id, a.score, a.submit_date FROM `file_grade_answers` AS a LEFT JOIN `file_grade_answers` AS b ON ( ( a.file_id ) = ( b.file_id ) AND a.submit_date < b.submit_date ) WHERE b.submit_date IS NULL ) AS t3 on ( t1.filegrade_id = t3.filegrade_id ) WHERE `t1`.`propid` = '209' ORDER BY t1.filename ASC Untested -- that's the idea.
  14. You're in the wrong forum. You're asking about how to make another request to the server from a client-side value -- that's what AJAX is all about. Though I suppose if it's a really small list, you can do it all in JS.
  15. The "old way" was a hack, which as you can't see, wasn't flexible.
  16. Then you just need to join in the second query as a derived table, using filegrade_id as the join condition -- but drop the GROUP BY. You didn't write the query you're asking for help with? But you're confident changing it?
  17. You know, it's funny -- you ask for help. Then you ask for clarification about the help you're offered. And then you go about solving the problem on your own anyway. So why bother posting the in first place?
  18. How are these two queries related? They don't share a table.
  19. There's no concept of "ID changing" in mysql. Ask for all of the fields, if you want to show the output selectively, that's up to you.
  20. Why the GROUP BY in the first query?
  21. You'll need column aliases to ensure that your field names don't collide.
  22. There are no such things are "urgent tasks" on free forums. Are you familiar with mysql_query()?
  23. Actually, I want a doctor who knows what he's doing -- he's allowed to tell me that I'm an idiot. Anyway, what you're looking for is managed hosting.
  24. Well, you might want to use $result somehow.
  25. IFNULL( MAX(@win_streak := CASE lmr.result WHEN 'Win' THEN @win_streak +1 ELSE 0 END), 0 ) AS `win_streak`
×
×
  • 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.