Todays Tweets . . .

September 8, 2009 · Posted in brain dump . . . · Comment 
  • having seen todays 26 degree forecast I'm wearing shorts to work, maybe for the last time this year? #
  • (picks up card) huh . . . Advance to Chalfont & Latimer. Do not pass Paddington, do not top-up your Oyster, fair enough #morningtoncrescent #
  • #morningtoncrescent hmm, would have gone with West Ruislip but with the Monument/Bank interchange still b0rkd it'll have to be Hatch End ๐Ÿ™‚ #
  • coffee or tea . . . that is the question??? #
  • RT @eBeth: Ooh – native Flickr app now out for the iPhone.. (must go take a look now!) #
  • forgot I'd booked beer and a curry with a colleague over from Amsterdam #pectember #FAIL #
  • oopsie . . . diet go bye bye!! http://yfrog.com/0xv8vgj #
  • oooooffff . . . have eaten too much, leaving the curry house now ๐Ÿ˜ #
  • goodnight Twitter (facebook) . . . going to bed now to dream that I didn't just totally blow #pectember with that curry ๐Ÿ˜ #
  • yea, ignore the tweet from half an hours ago, had a couple of things to do . . . NOW I'm going to bed! #

Powered by Twitter Tools

How old are you???

September 8, 2009 · Posted in MySQL · Comment 

Everyone knows how old they are, right?? Well OK, so sometimes I have to think about it a couple of times just to check (what with it nearly being my birthday) but still, it’s pretty easy.

However if you’re a database without a function to find out age it’s a tad more tricky.

This just came up as someone in the office was writing a report that included calculating the users ages . . . the solution they used was good enough for our purposes but was also one of those little things that bugs you because you know there’s a better way to do it.

The initial solution was as follows . . . btw, let’s also chuck the date of birth into a variable to simplify the queries ๐Ÿ˜‰

SET @dateOfBirth=’1972-10-03′;

SELECT (DATEDIFF(NOW(), @dateOfBirth))/365;

Read more

Todays Tweets . . .

September 8, 2009 · Posted in brain dump . . . · Comment 
  • at end of the first week of #pectember I have lost 4lbs!! Have turned the livestrong.com dial to 2lbs a week and have lost 300 calories/day! #
  • something weird going on in Cambridge, just been past the Courthouse and there are a bunch of satellite vans round the back??? #
  • ah, I guess it's related to this, http://news.bbc.co.uk/1/hi/england/cambridgeshire/8241723.stm #
  • have a couple of free evenings while theWife's away – am spending the first driving my in-laws to Heathrow, M25 'fun' and games approaching #
  • in-laws depoited, at South Mimms for a comfort break on the way home, denying myself the usual Burger King motorway treat today #pectember #
  • I should really go to bed now – gonna be wrecked at 6am tomorrow morning ๐Ÿ™ #

Powered by Twitter Tools