Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Duplicate topic - http://www.phpfreaks.com/forums/index.php?topic=356569.0.
  2. You're working up to a ban with all of this cross-posting.
  3. Don't mark topics solved without posting the solution.
  4. It's unicode -- case-insensitive -- and one of the "general" collations that includes "common" characters.
  5. All these subqueries make me think something is horribly wrong.
  6. Then please post the final working query.
  7. Where's your GROUP BY clause?
  8. SUM() of datetimes doesn't make any sense.
  9. Oh, it can be done -- it just might be easier to calculate in PHP if this is a "one-time" thing, and then update the corresponding rows.
  10. Sorry, I don't understand the question.
  11. Then why not get all the parents first, then a second query to get their children? Or at least process the results sepearetly?
  12. SQL isn't designed to operate on pairs of rows -- you'll have to fake it with a user variable, or use a self-join, assuming you "know" how to find record N+1.
  13. Assuming you told it to do so with mysqldump.
  14. Or you can use NOT EXISTS.
  15. FYI, that would negate the use of an index -- you might want to add a "fake" time to the RVALUE instead.
  16. Please stop posting your code. And you really shouldn't be posting your DB credentials either -- but as you'll notice from the error message, you're not actually using the password.
  17. If you read the posting rules, you'll notice that we'll need much more information to help you.
  18. I always prefer: select columns from table where date <= NOW() + INTERVAL 7 DAY
  19. +1
  20. What?
  21. I've heard nothing but horror stories about them.
  22. Covers: Part 1: Using the MySQL Improved Extension, mysqli Part 2: Using the MySQL Extension, mysql Part 3: Using the PDO Extension With MySQL Driver, pdo_mysql Part 4: Using the MySQL Native Driver for PHP, mysqlnd Tutorial is here.
  23. Well, a scalar subquery, that is.
  24. Hopefully this presentation will stay online at scribd... it's simply fantastic, probably the best I've come across in recent memory. At 220 slides, it's quite lengthy -- but the lessons learned are invaluable, so be sure to read all the way to the end. A MUST READ!!!! EDIT: This year's version of the presentation -- some really great stuff in here, particuarly about hierarchies.
×
×
  • 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.