Tag computing

Showing local times with PHP

Here’s a little snippet of PHP that will help anyone grappling with a project that involves (or will be used in) multiple timezones.

Formatting MySQL datetime with PHP

Hello again, anotherĀ of my posts of information skimmed off the top of the vast information pile that is my day! These posts are not just for the benefit of anyone who reads them but also for me. I come across so many small tips and methods here and there that I just want to keep a record of them! This post is about formatting a mysql datetime field with php.

Accurately Detecting Browsers in Javascript

Another little post to illustrate something that I came across during the 9 to 5. As us technophiles probably know, there is an overwhelming difference in interpretation of web standards between browsers hence a vast range of different visual output from the same codebase. This is annoying for the user they won’t understand why the same page is fine in Firefox but screwy in IE. And for us coders it is a major headache trying to write code that is good everywhere!

Conditional Concatenation in MySQL

I have come across another gem of a problem (and a resulting solution) during my endeavors at work. Essentially an SQL statement was needed that had to take several values from a table and join (concatenate) them together into one large string for use in a drop down box joomla style. But of course the plot thickens…

Using jQuery to Set the Default Option in a Select Box

Today at work I came across a situation where we needed to set the default value of a <select> box on a form, normally this would be a perfectly simply operation. If it were a straight php form I would have simply echoed an <option selected...></option>. But we are working with Joomla in a fully MVC context so all is not quite so simple. In wades jQuery with a deserved look of achievement on its face…