Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. That's correct -- you can't use = with two values; you'll have to use IN().
  2. So you have the MYD file from a backup, or not?
  3. Since you haven't shown us (a) the table definition or (b) the value being adjusted, we can't say -- though int supports values up to ~2 billion (~4 billion if unsigned).
  4. Have you consulted the refman page on this issue?
  5. DISTINCT is for SELECT only... so I'm not sure that I understand what you're asking.
  6. You have to make sure everything -- html, php, mysql -- are all aware of the correct character set.
  7. Let's go back to the table1/table2 example... how does you magic number come into play?
  8. Then you need to join the cd table to the song table...
  9. Careful with specifying a field name inside COUNT() -- it's not the same as COUNT(*).
  10. Try this: SELECT t2.* FROM table2 AS t2 LEFT JOIN table1 AS t1 ON ( t1.id_table2 = t2.id ) WHERE t1.id_table2 IS NULL
  11. What was the problem with the solution proposed earlier?
  12. This isn't a mysql issue anymore... if the issue isn't resolved, I'll move this topic to the appropriate board.
  13. That doesn't sound right... have you established a reliable connection between the two? what about non-mysql ports?
  14. I don't see why a simple count() and group by won't suffice.
  15. LEFT JOINs are easier to write and easier for mysql to figure out.
  16. Yes, JOINs would be required... what kind of output are you looking for?
  17. Because that's how deleting from MyISAM tables works -- you end up with fragmentation. No big deal, OPTIMIZE TABLE will fix that -- but depending on table size, it might take a while, and it LOCKs the tables.
  18. You can use DISTINCT for that.
  19. Yes, but a mysql-specific one.
  20. Well, you can run check tables and see what's going on... but make backups first.
  21. This is so very much not a mysql issue... there's a race condition, or the usual asynchronous games.
  22. Just FYI, you can move the fields around, but as indicated by others, unless you're actually browsing the tables from an IDE, it doesn't really matter.
  23. fenway

    Query ?

    you should probably use char_length(), so that your code works if you ever switch to a multi-byte collation.
  24. Not to sound brash, but there are countless tutorials, both on phpfreaks and elsewhere -- what's the first hurdle?
  25. This is a free forum... you can't rush free help. Anyway, don't blame mysql, blame your browser -- or at the very least, the headers you're sending to your browser.
×
×
  • 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.