Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. 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?
  2. If you assigned today's date to start always, and then adjust that time by adding the difference from the end to the start, this will auto-correct itself -- if it's negative (i.e. ends after midnight), it will "subtract a negative" and add this number of hours, which mysql will notice and push the date for you.
  3. Not really... but you could just prepend the date piece, and have mysql do the work for you.
  4. No it doesn't. Not the return value of the mysql_query() call... the actual query itself.
  5. You should look at the sticky in the child board of this forum.
  6. Sure, but you're checking every 3 minutes, so why are you worried about speed?
  7. First, don't use dreamwaver. Second, update your libraries.
  8. Yeah... bad idea... since you don't have to "guess" the table name, do it in php.
  9. No problem, just a collation issue.
  10. Have you tried using a standard connection string line frist?
  11. I suggest you use a mutex table to generate the full sequence range, then left join is null.
  12. Don't modify it with php... it's a database.
  13. Sounds like there's a collation issue.
  14. Read up on the LIKE comparison operator.
  15. Yes, that's fancy, but would be entirely unnecessarily if the table were normalized properly....
  16. or LENGTH()? Beware of multi-byte characters.
  17. fenway

    Possible?

    Why on earth would you want to do this?
  18. Assuming you had an index on 'date', how many new messages would there be? It's going to add alot of overhead to do read & write operations vs just read.
  19. This really isn't a mysql question... if there is POST data, you'll need to re-post it or pull it from somewhere else.
  20. fenway

    Multiple IP

    Lists? Like in a single field? Please say no....
  21. Either use a full text index to cover all 5 columns, or use a lot of LIKE clauses.
  22. You can't do choose the table name dynamically... do it in 2 sql statements, or decide programmtically.
  23. I see you're new here... please try and post your solutions so that everyone can benefit.
×
×
  • 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.