Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. What's not working about it.
  2. Sounds like it's "working" very slowly... this may indicate something programatically incorrect.
  3. Your OP asked "why it will only update one row". I don't know what you mean by "instead of using post". You want to update 2 fields in a single row? No... separated rows. Related rows?
  4. Yes, you have double-quotes nested inside double-quotes... and waaaay too many backticks.
  5. Why do you think 1 row is not enough?
  6. Check out the sticky on db normalization... basically, rip out the teamID from the players table, and have a player_teams table that links the two.
  7. You want a UNION, not a JOIN.
  8. Why does the page title already "know" about the parent ID? that's bad...
  9. It's not the size of the table, it's the nature of the query.... did you enable the slow-query-log?
  10. Forgot about top... use mysql's internal performance indicators.
  11. You want "WHERE MATCH( first, last, city, location, hospital ) AGAISNT '$keywords[$i]'" But you can put all of the words together....
  12. Depends... usually you can't exactly replicate UNION withj JOINS.s
  13. NO NO NO NO NO NO NO NO NO! Don't make your auto-increment column TINYINT -- make it UNSIGNED INT (or BIGINT), and you'll be fine forever. Don't set up a situation where your IDs can be resued -- that's EXACTLY why the DB won't let you do this!
  14. I question your choice of incrementing a value... this isn't thread-safe. Also, until the run the select query counterpart to your update statement, you won't know for sure how many rows are matching.
  15. Hierarchal data is not fun to store... check out the sticky on normalization, there's a link to dev article there.
  16. Depending on how quickly your script runs, NOW() may return the same value -- as I indicated in the other thread that you started, you're seeding rand() -- don't do that and you'll be fine. But LIMIT 5 will save you the trouble of the extra loop!!!
  17. Not sure exactly what php db wrapper is giving you that message...
  18. You don't really need to seed rand() like that... it's fine on it's own. I just meant random over multiple groupings or not.
  19. Random how?
  20. Just don't union *... specify the fields you want, as long as the datatypes match up, you're ok.
  21. You can't update the source table in the same statement... this is known limitation.
  22. fenway

    SEARCH NCR

    Huh?
  23. fenway

    NULL space

    NULLs don't have space requirements per se.
  24. That's becuase you need it in double-quotes...
  25. You should check the refman for the syntax.
×
×
  • 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.