Posts

Showing posts from December, 2009

CompassBill has arrived

It's finally here. I have been working on CompassBill, an online billing / invoicing system for a long time. After many sleepless nights, we finally got things on track and launched it. I don't often plug my own projects, but I think this one is worth a look if you are looking for a simple invoicing system for your clients. As a web designer, I have been eating my own dog food for a couple of years now, so if you are in the design / development field you might find this is a pretty decent way to bill your clients. Read and post comments | Send to a friend

Manipulating dates in PHP

So a client asked me 10 minutes ago if I would mark it on my calendar to disable logins for their web site starting on December 7th, 2009. An easy thing to do when you know the fast and fun way of doing it. Don't get me wrong, there are plenty of ways to manipulate dates (in PHP), but they seem too high maintenance. I didn't want to convert to unix time or worry about the mktime function when I just needed a quick and dirty solution that I could remember without reviewing syntax. In other words, I wanted a date that I could manipulate fast! What did I do, I turned to strtotime(). <?php if (strtotime("now") >=strtotime("december 7, 2009")) { $message="Sorry, the deadline for rewards redemption has passed."; } ?> So there you go. I like strtotime because you can use natural dates to do comparisons. Just my preference, but sure beats the alternatives in my opinion. Please comment if you have other cheap tricks for manipulating dates, I'm

Converting a MySQL database to SQLite on a Mac

Image
I recently decided to migrate an e-commerce shopping cart system I have been developing for a long time from MySQL to SQLite. I went back and forth over this idea, but I decided it made sense to have an e-commerce shopping cart that the user can install by literally dropping the folder into the site. In order to make the transition as easy as possible, I decided to try to convert the database rather than re-create the many tables and fields needed to make it all work. During my research I found some paid products and a bunch of scripts scattered around, many in Perl. I was looking for something simple that I could try out with minimal effort. I found a script posted at http://www.jbip.net/content/how-convert-mysql-sqlite that worked like a charm for me. I use a Macbook Pro running Snow Leopard. I develop using a local MySQL database and Apache using  MAMP . In order to get started, you need to do a MySQL dump of your database (in t