RSS Feed   Mini App: PHP Hour Tracker  Today I didn't have much
to do so I created a system to keep track of my hours. It's a
very simple mini application that you'll notice looks uncannily
like gmail. I decided to take a break from my normal object-
oriented approach to everything and write something without any
classes (with the exception of exception handling). There are
almost no comments in the script, but it's self-explanatory. Go
check out the My Hours Timer at The way it works is that you
install it by going to index.php?install and it will attempt to
create a SQLite database. I abstracted away the database to
functions (without classes!), the trick is a nifty PHP4-era hack
that makes singletons by means of declaring a static variable
within a function. You can view the source code of My Hours or
simply look at how I dealt with database calls...  // OO way
with iterators: $result = $db->query("SELECT ...");     $row =
$result->current();  // non-OO way $result = query("SELECT
...");     $row = currentR