Entries by Skye

GoDaddy DNS Preview breaks Javascript and jQuery

A client of mine is redesigning a website and I’m helping out with the PHP and Javascript. The client is using GoDaddy to host the site and because the current site is still live, we have to use GoDaddy’s PreviewDNS in order to test the new site. I started coding some basic jQuery and this […]

UNIX: Find the largest files and directories

Today I was connected to my server through SSH copying over a site to a new domain and needed to figure out if I had enough server space for the copy and which files/folders were taking up the most space. I’d never done this before so I did a quick search in google and pulled […]

Using MySQL date functions to save time in PHP

Ever since I started using PHP, if I ever needed to store a timestamp I always stored it as an INT. Only until recently have I switched over to using the DATETIME and TIMESTAMP data types in MySQL exclusively for any dates I needed. These fields are in the format of YYYY-MM-DD HH:MM:SS. When I first start using these field types, I didn’t know how to convert back and forth to a UNIX timestamp for use in PHP so I made a bunch of functions in PHP to convert between the two. That was until I found out about the MySQL date and time functions.