Tuesday, March 24, 2009 6:21 PM
by
brian
MySQL Chuckle
Until version 5.0.2 I think it was, it apparently was legitimate to put the date of 2/30/2009 or any other day in February that didn't actually exist (some > 28 on non-leap years or > 29 on leap years). I don't know if that's true or not, read it in a book, but if it is - WOW! Glad that was fixed (too bad it was missed/delayed in versions 1 - 4!)
But again, not to poke too much fun, MySQL does have this 'LIMIT' function which I just love:
SELECT * FROM table WHERE whatever = "whatever" ORDER BY something LIMIT 20, 10
It's so clean and simple. This is effectively giving you page 3 of data in a result set that is being paged by 10 records at a time. I love the simplicity of it, and sure, it's still doing the full SELECT, but it doesn't show as a performance hit on any tables I'm working with. Since PHP is very 'data' driven language I can see why these two play so nicely together. I've heard a similar feature exists in Oracle, but I really think this should be standard in all databases where it isn't already.
They also have the ability to SHA1 encrypt a value as built in function so you *could* encrypt at the database on an insert if you wanted to, think it also has MD5??? Regardless, nice little bonus feature/function; maybe it exists in other worlds (MS) but I haven't run across it yet - I'm sure somebody will let me know one way or another on that. And again, with PHP being such a 'data' driven language I can see where this works well.
Stupid stuff I know that most people wouldn't car about, but all part of the fun of learning something new for me.