Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. It can be done, but it's preferable to simply include a relative path if at all possible.
  2. fenway

    SELECT Issue

    See how many rows you're getting back... also, I don't know if _array() defaults to ASSOC.
  3. First way has less for the server to parse; but then you don't get back the ID of the inserted records. Go with "insert2" -- if you're doing bulk inserts, use LOAD DATA INFILE, or the IGNORE attribute.
  4. Not to sound brash, but get it up and running first... I've seen way too many projects plan for phase III without ever getting off the ground.
  5. Not even remotely mysql-related...
  6. You don't -- the "future" is very far away. Leave it be, make sure you abstract the connection strings, and you can fiddle with load balancing later. I've built 100s of websites on the same db server with no issues yet.
  7. If you have to let it go, then so be it... I've been pre-occupied on my end, too, and haven't been able to actually run any other these on my test box... if it ever comes back, let me know.
  8. They're exactly the same, the php function just wraps it.
  9. the former is the mysql function, the latter is the php function.
  10. fenway

    From 4.1 to 5

    Whatever you're not optimizing... for example, mysql 5 has merge indices, so that you can use multiple keys on a single table. Sounds great, right? Well what about all those queries where this would be disastrous? Like almost every old query you've ever written? No so simple.
  11. Yes, LAST_INSERT_ID().
  12. Let's ignore the timezone issue for a minute... yes, timediff() return HH:MM:SS, have you proved that you can use this for an interval? There's always the extract() function... and you should be using CURTIME() instead of that craziness with NOW().
  13. And you've checked the grants table to make sure do have this permission?
  14. TIMEDIFF only takes time fields as arguments, don't concat.
  15. Which mysql version?
  16. There are many blogs on optimization, they deal with nitty-gritty things like tables in memory, row cache, etc. It get's really ugly, trust me, you don't want to go there.
  17. fenway

    From 4.1 to 5

    You optimize one thing at the expense of another, always.
  18. fenway

    From 4.1 to 5

    I don't understand your fascination with performance issues... everything comes at a price.
  19. It's only education if you apply what you learn.
  20. Normalize it as much as reasonably possible, and then fix it when it breaks.
  21. fenway

    Better way

    Same question as before, eh? If you can generate summary tables, do so....
  22. If there is an appropriate index in place, you'd be surprised how quickly it will run.
  23. You'd have to check the refman, I have no idea.
  24. I don't see that function, I don't see tmp_name, and don't see you doing it 3 times.
  25. Assume we're dealing with 23:00 - 04:00. If you convert 23:00 into 2007-09-24 23:00, and subtract the time difference [ e.g. TIMEDIFF( end, start ) ] calculated in hours as the interval offset -- which would give -7 -- your expression would be "2007-09-24 23:00 - INTERVAL -7 HOUR", which mysql will happily report back as "2007-09-25 04:00". Isnt' that what you want?
×
×
  • 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.