Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. "Newspaper." would be the error. $day is undefined?
  2. No, put the images someone on the file system, then store a path to where it is.
  3. 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.
  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. Complex indeed... well done.
  8. 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.
  9. That's right... as I said earlier, you'll have to pull the tuples out first, then match them.
  10. 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.
  11. 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 )
  12. 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".
  13. I can show you the join... but I don't understand what table A is for.
  14. The painless way is to normalize your database with a many-to-many table linking appartus to events.
  15. No, but then you'll be able to troubleshoot it.
  16. There's nothing special about making a table there vs. anywhere else... find a control panel, and issue statements.
  17. I'm confused about the table4 fields in the where clause...
  18. 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.
  19. Try that replace() on the equivalent SELECT query, with the column before and after the replace.
  20. If you're using left join, that wouldn't be an issue.
×
×
  • 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.