Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. I don't know what you mean -- rows are in arbitrary order unless you specify an order by clause.
  2. Sorry, I all I see is PHP code. Echo actual SQL queries, with sample output and desired output.
  3. Yes, but it's evil -- performance losses all over the place. If you're certain you won't exceed 65kB, don't use TEXT.
  4. case when placement < 5 then number_of_entrants/placement when placement = 5 then 0 else 0 end
  5. Combine how?
  6. Sorry, I don't follow.
  7. Well then you'll have to revoke the other privileges -- easier to revoke all, the grant only the ones you want.
  8. A few joins would do the trick, too.
  9. You can actually use "0" as a shorthand for a zeroed-out date -- comes in handy if you ever change to a DATETIME later.
  10. Depends on the length -- these days, varchar stores up to 65kB, so it's the best choice, unless you have binary data.
  11. Examples of what? the DATETIME column type?
  12. By "edit", you mean update/insert/delete? "All" is very dangerious.
  13. Huh? Search how?
  14. That's quite a bit to chew off at once. You could have table with columns for all of that info, plus another few with city_id. Not sure what you mean by "template" or "automatic". And auto-increment is used for getting unique number for each row in a given table.
  15. Sorry, I won't visit random links -- you'll have to narrow down the problem further.
  16. That's hard to believe --mysql_fetch_assoc() should work just fine here.
  17. If there can be multiple entities for a given related record, then multiple tables in the preferred way to go.
  18. Actually, you just want a join here: $articles = mysql_query("SELECT `post_title`, `post_content` FROM `wp_posts` JOIN `wp_term_relationships`ON ( `wp_term_relationships`.`object_id` = `wp_posts`.`ID` ) WHERE `term_taxonomy_id`='" . $term_taxonomy_id[0] . "'");
  19. I don't follow -- what's the problem?
  20. What changed it/
  21. Well, technically, you don't need a begin/end for such a simple statement.
  22. Sorry, I don't follow.
  23. Well, with a CASE statement, you can do anything.
  24. Then you have a one-to-many relationshiop.
  25. Try the equivalent select for testing.
×
×
  • 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.