Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. What doyou mean "likn to each".
  2. You just need to add another binary expression to check for the 18 restriction and all this to the order by.
  3. What's the issue? GRANTs allow this.
  4. Oh, i see what you want... do this in php.
  5. Then change the date format in your form.
  6. Let's see the actual echo here, please.
  7. Let's not and say we did... only post SMALL, RELEVANT code snippets -- NOT the entire file.
  8. Even if you think the files locations won't change, don't force your application into that decision... and the html has to come out regardless. You'll thank me later. As for the JOIN, it sounds like you'll need to join on the country field... but it's very bad form to use a text field for this... you really need to include a foriegn key to the other table.
  9. Try using GROUP_CONCAT().
  10. Try this: SELECT cat.category_id , cat.category , cat.stickypost , t.category_id , t.topic_id , c.created_on FROM forum_comments AS c INNER JOIN forum_topics AS t USING ( topic_id ) INNER JOIN forum_category AS cat USING ( category_id ) INNER JOIN ( SELECT t.category_id , MAX(c.created_on) AS created_on FROM forum_comments AS c INNER JOIN forum_topics AS t USING ( topic_id ) WHERE c.confirmed = '1' AND t.confirmed = '1' GROUP BY t.category_id ) AS c2 ON ( c2.category_id = t.category_id AND c2.created_on = c.created_on )
  11. First, echo the query. Second, what's not working?
  12. Huh? You have limit 1.
  13. Impossible to debug this way... this is a magic object class.
  14. Depending on what you want to do with the group_id's, group_concat() might help.
  15. You can check the refman page for the relevant syntax.
  16. fenway

    stopwords

    Basically, no.
  17. I'm sure this can be written with a LEFT JOIN is NULL... just TLDR for now.
  18. I don't understand your clarification. And you don't store full paths because they can change ... same with html. Store the important piece -- filename -- and deal with everything else in template code.
  19. Why not a COUNT() with GROUP BY?
  20. Done what? The whole point of USING() is that you don't need the prefix.
  21. Right, that makes sense. I'm not sure if this will work -- the subquery should definitely pull the value you're interested in -- but I haven't thought the rest through, the join condition is a bit tricky. What does this produce? SELECT cat.category_id , t.topic_id , c.created_on FROM forum_comments AS c INNER JOIN forum_topics AS t USING ( topic_id ) INNER JOIN ( SELECT t.category_id , MAX(c.created_on) AS created_on FROM forum_comments AS c INNER JOIN forum_topics AS t USING ( topic_id ) WHERE c.confirmed = '1' AND t.confirmed = '1' GROUP BY t.category_id ) AS c2 ON ( c2.category_id = t.category_id AND c2.created_on = c.created_on )
  22. That depends how it's configured on your remote server.
×
×
  • 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.