Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. These engines are completely and utterly different -- don't get hung up on that "count(*)" issue, since it's mostly irrelevant. I think there are some relevant stickies.
  2. fenway

    Query

    Yes, I understand... see my previous post.
  3. 3 times? Well, of course... issue an update statement to calculate the average afterwords.
  4. No, I meant SELECT status, order_type, count(*) from `table` group by status, order_type.
  5. That's right -- no views prior to v5+. You could always make a temporary table....
  6. And you're sure that both are version 5?
  7. Yes, that wil will work... you could also try and get away with COUNT() with GROUP BY status, order_type -- that way, at least all the counting will be from a single query.
  8. FYI -- we are not changing the way the forums work; this is 3rd party forum software from SMF.
  9. A "pivot table" is still a bunch of subqueries... and efficiency isn't really an option here, you have to run the queries on way or another.
  10. Sorry, my eyes are tired today... what version of MySQL are you running?
  11. You're missing "SELECT"!
  12. No, I mean: updateGrade = $db->sql_query("UPDATE ".$prefix."_tl_session_grades SET IRAT_Grade = (SELECT ((IRAT_Raw / $IratQuestions) * 100) AS IRATGrade), GRAT_Grade = (SELECT ((GRAT_Raw / $GratQuestions) * 100) AS GRATGrade), AppEx_Grade = (SELECT ((Appex_Raw / $AppExQuestions) * 100) AS AppexGrade) WHERE Session_ID = '$Session_ID'"); if (!$updateGrade) { echo("<p>Error performing query: " . mysql_error() . "</p>"); exit(); }
  13. You can't have a fulltext index cover non-text columns! e.g. int ( = seats_available), or times.
  14. You can't... separate columns by commas.
  15. What's the error?
  16. The code you posted that "worked" is fine... because the expression in in the where clause.
  17. The other posted code is the only way this will work -- you can't use a column alias in a WHERE clause, because the column names aren't "used" until *after* the result set has been collected -- at which point it's too late. However, you can use it in an ORDER BY / GROUP BY / HAVING clause for the same reason.
  18. As I mentioned above, this sounds like auto_increment_increment... aschk, why do you feel this causes "other problems"?
  19. You can change this via a connection variable.
  20. fenway

    Query

    You can easily accomplish this with user variables storing a rolling TIMEDIFF and an ORDER BY clause.
  21. I believe that INFORMATION_SCHEMA is part of the SQL standard.... MySQL 5+ only.
  22. No need to keep posting the entire code over and over again. So you're saying that r.checked is never true?
  23. Water with concentrated lemon juice -- keeps the taste buds from craving all of that sugar, and keeps you well hydrated.
  24. "Skip" and "continue" have no meaning in set theory. Get info from where?
  25. Where are you calling this function?
×
×
  • 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.