Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Huh?
  2. IF() can only be used to return an RVALUE... you'll have to separate out each field.
  3. So will IFNULL().
  4. That's because you're requested non-aggregated fields in the select list AND using group by.
  5. Well, if you used proper join syntax, it might be easier to follow and maintain. And * and GROUP BY don't mix. [sigh... why isn't ONLY_FULL_GROUP_BY the default... oh, wait, I know why... ignore me]
  6. Don't laugh... I have a client still running 3.23 -- works just fine.
  7. That means there's something wrong with your db class -- but apparently it's not yours.
  8. And depending on which sql mode you're running in, you may or may not be told about it. And it gets even more complicated with multi-byte character sets.
  9. Maybe I wasn't clear... how are you determining how these rows are related?
  10. I'm sorry, TLDR -- what's the question?
  11. Which line in which file?
  12. What I wanted to see what the contents of the $sql after variable interpolation. As for the count, as you say, you are filtering it... if you want to get a different count as well as use this to ORDER the same query, you'd need a sub-query.
  13. That sounds like a php question... the fact that the data comes from mysql really has nothing to do with the fact that you need a php plugin to make word/pdf files
  14. If there's northing wrong with mysql query, then this isn't a mysql question.
  15. Like revraz said, make a proper date column. In the meanwhile, an "ORDER BY CONCAT_WS( '-', ra_progbyday_year, ra_progbyday_month, ra_progbyday_day) DESC" will work.
  16. I have no idea what you mean.
  17. what do you mean? this is the actual query Not that's php.
  18. How about some string literal quoting???
  19. Really? Did you even look at mysql_error() after executing the query? You can't just throw group by wherever you want.
  20. Show the actual query, and the actual output, and what's wrong with it.
  21. Then you'll need to gropu by zipcode and grab the most recent, and THEN join that result to the remaining info.
  22. nah, it works fine, like i said, i just can not import floats into the table from the csv file. if i change the field to varchar, everything works great. Then it doesn't "work fine" -- it's complaining that the value from the first row -- the actual word "price" -- isn't a floating point value. What a surprise.
  23. Same thing... alias the column names using as to create unique names.
  24. You can use the resultset from one query as the input for another... the refman has examples.
  25. Oh... like a one-time thing? Then try and INSERT INTO... SELECT ... and add an auto_increment column.
×
×
  • 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.