Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Double-post.
  2. You mean keep track of the previously inserted UID?
  3. Double-post -- actually, quadruple.
  4. Now you're really posting about the same topic multiple times -- topic locked.
  5. I don't believe that you actually updated them.
  6. This is (again) one of those time where you are trying to resist having to actually issue queries the way the SQL parser executes them.
  7. You seem to be posting a lot of topics on the same single item.
  8. You really don't want DISTINCT * -- what do you want? My guess is you need to JOIN twice, then COALESCE.
  9. You're going to get burned on whitespace.
  10. SELECT dbUsers.id, dbPosts.post, dbUsers.username, dbPosts.post_id, dbPosts.karma_up, dbPosts.karma_down FROM dbPosts INNER JOIN dbUsers ON ( dbPosts.username_id = dbUsers.id ) INNER JOIN dbFriends ON ( dbFriends.friend_id = dbPosts.username_id ) LEFT JOIN dbDownvote ON ( dbDownvote .post_id = dbPosts.post_id ) WHERE dbDownvote .post_id IS NULL dbDownvote.user_id = $user AND dbFriends.user_id = $user AND dbFriends.status = 1
  11. Disconnect can happen at any time -- none is more likely than any other. Besides, what's the problem with a partial insert in this case?
  12. This question came a while ago -- something with a php setting that controls this behavior...but I don't recall the details. It's on the forum, somewhere.
  13. You have it backwards -- if you choose to use their DBMS product, it's up to you, the programmer, to learn to use it correctly. Otherwise, write your own, or pick a different product.
  14. @ebmigue : DBs, at least the relational ones, are based on set theory -- nothing else. To claim that NULL has no use is just proposterous.
  15. You're not seriously suggesting that NULLs shouldn't be used? Or LEFT JOINs?
  16. How do you relate vote to posts?
  17. Huh?
  18. What kind of "problem"?
  19. Perhaps easier to understand for a person, but not for the parser.
  20. Echo the string you're passing to mysql_query, followed by mysql_error output.
  21. I suggested an alternative.
  22. It's always the programmer -- they wrote the query -- as long as you're not cheating with optimizer hints.
  23. Why not have a web interface?
  24. I missed that too -- but I'm not the expert on PHP configurations.
  25. But truthfully, using a LIMIT with an ORDER BY is not likely what you mean.
×
×
  • 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.