Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. No, put the images someone on the file system, then store a path to where it is.
  2. The whole concept of int "length" has always been annoying... bigint(20) is particularly silly. The refman says the following: So basically, pick the right int -- TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT -- the default "length" mysql assigns is the max width anyway.
  3. Careful with those updates, they're not thread-safe...
  4. I think there's also a way to query the table metadata in <v5.
  5. Sorry, which one is missing now?
  6. Joining is almost always faster, though sometimes harder to read.
  7. You're matching everything.
  8. Complex indeed... well done.
  9. Actually, you really should have a DATETIME field and that would solve all of the problems; alternatively, you can just make a fake datetime from both pieces combined. Didn't realize you could "cheat" and avoid the derived table completely.
  10. That's right... as I said earlier, you'll have to pull the tuples out first, then match them.
  11. Yeah, sorry about that, long day.
  12. Well, a LEFT JOIN will fix the report #2 missing problem. If you want the specific reply, run the above query as a dervied table, and then join back to the original table with both these fields in the ON clause.
  13. Understood... SELECT a.personA, ba.personName AS personAName, b.personB, bb.personName AS personBName FROM tableA AS s JOIN tableB AS ba ON ( ba.personID = a.personA ) JOIN tableB AS bb ON ( bb.personID = a.personB )
  14. It's silly to count lines of code, or even hours... I've done work in 10 minutes that would take other people 10 hours... doesn't mean it should only be worth 1/60 the price! I blatantly refuse to work by the hour, everything is project-based, since it has an actual, fixed value to your client and requires (hopefully) a fixed amount of effort from you, regardless of how hard you work per hour or how many open curlies you put on their own line. If it's a very small "tidy script", I've been known to charge upwards of $75/hour just so that the client realizes there's no point in annoying me for small "jobs".
  15. I can show you the join... but I don't understand what table A is for.
  16. The painless way is to normalize your database with a many-to-many table linking appartus to events.
  17. No, but then you'll be able to troubleshoot it.
  18. There's nothing special about making a table there vs. anywhere else... find a control panel, and issue statements.
  19. Echo the query.
  20. I'm confused about the table4 fields in the where clause...
  21. Not trivially... you can easily get the list of the events, but without knowing how many there are in advance, you won't know how many tables to join/union.
  22. Try that replace() on the equivalent SELECT query, with the column before and after the replace.
  23. If you're using left join, that wouldn't be an issue.
  24. the former is for bulk inserts, directly from from a file, for example; the latter just allows for PK collisions; DELAYED is actually what I meant, if you don't need the UID back.
×
×
  • 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.