Secure Development Laptop

December 31, 2008

So that I could continue developing the ‘Trading Account Management’ system while on the road, the installation of lighttpd/database had to be secured. In particular, sqlite had to be used rather than mysql, since the data in the database itself was critical to the business (and there was no time to conjure up ‘fake [...]

Comments Off

Some MySQL compatibility functions for sqlite

July 28, 2008
Tags: , ,

Here are a couple of additional functions to increase interoperability between MySQL code and sqlite :
unless($dbh = DBI->connect(”DBI:SQLite:dbname=$db_login{file}”, “”, “”) ) { die “Cannot connect to database – version : “.$dbh->{sqlite_version};}$dbh->func( ‘UNIX_TIMESTAMP’, 1, sub { return POSIX::mktime(POSIX::strptime($_[0], ‘%Y-%m-%d %H:%M:%S’)); }, ‘create_function’ );$dbh->func( ‘FROM_UNIXTIME’, 1, sub { return POSIX::strftime(’%Y-%m-%d %H:%M:%S’, localtime($_[0])); }, ‘create_function’ );
to make [...]

Comments Off