Tag: mysql

  • Convert string from dd/mm/yyyy to yyyy-mm-dd using mysql

    I had a large dataset with all the date fields in the format DD/MM/YYYY. I needed to convert them to YYYY-MM-DD . I ran the following queries: UPDATE TABLE_NAME SET FIELD_NAME = replace(FIELD_NAME, ‘/’, ‘-‘); UPDATE TABLE_NAME SET FIELD_NAME = str_to_date(FIELD_NAME,’%d-%m-%Y’); Hope it helps…

  • Benchmarking PHP / Apache / Your Code

    I’ve been looking at optimising my development and deployment servers over the last couple of weeks. Here is a tip I came across from Rasmus Lerdorf to benchmark your code and environment using siege siege -b -t30s -c5 http://www.twitter.com Try it out…