Tag MVC

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.

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…