July 4th, 2008
I have spent the last 6 years working for small web development agencies (Commonly places that do both web and print) and they all, and all the places I have delt with as a result have not taken anything on board from PHP5. You could drop them on a PHP4 server and their code would run just as happily. They do not use any of the benifits that PHP5 has given them. About all that has changed is they have lost their reliance on register_globals. Why is this?
Read the rest of this entry »
Posted in php | 2 Comments »
June 29th, 2008
This is something that slipped by me for a long time.
Like many other developers I know, I have written a function that takes a date from mysql (In any of the relevant formats, usually datetime though) and then formats it (Using substr() or strtotime() and date()) with PHP into a nice human readable format for display on the website.
There is a more elegant solution however.
Read the rest of this entry »
Tags: date, date_format, functions, MySQL, time
Posted in MySQL | 1 Comment »
June 25th, 2008
I came accross this problem recently while developing a time tracking application.
Typically, I have found that when viewing timesheets people prefer to be able to see the week at a glance. For this reason I will normally store them in a database with three int (day (From 1-7), Week (From 1-53) and year (From 0001 to 9999)). This allows me to easilly pull a two dimensional array from the database for output into the virtual timesheet
Read the rest of this entry »
Tags: date, php, week number
Posted in php | 5 Comments »