Tag Archives: Databases

Love SQL

Something I’m working on at the moment requires a rather large collection of data to be moved from several places into one clever little table that I’ve created. It’s going to consolidate functionality and make things much easier to script … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

MySQL default values should be better

I was creating a table a little while ago that stores a timestamp that is essentially an expiry date. I had wanted this to be a date 2 weeks in advance of the current date and time. With a timestamp … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

MySQL case insensitivity on varchar fields

I created a MySQL table like the following: CREATE TABLE `links` ( `id` int(11) NOT NULL auto_increment, `short_id` varchar(255) NOT NULL, `url` text NOT NULL, `user_id` int(11) default NULL, `created_at` timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `user_id` … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment