14
Jan 08

It's nice to be talked about…

Silicon Republic mentioned us today


08
Jan 08

Funny ha-ha-hangonwaitabloodyminute…

Some things have a real Dilbert type of humour to them. Every engineer and programmer out there knows exactly what I mean, but for the non-engineer, non-programmer types, allow me to summarise what the Dilbert type of humour is by describing it as the kind of humour you laugh at right up the point where you realise the author is describing what happened to you at work last Tuesday; after which, the humour palls somewhat.

At any rate, this post by Benji Smith falls squarely into the Dilbert category. Recommended reading for the next time someone recommends a framework to you.

Although that being said, I still find Prado, Symfony and a few others to be bloody useful gadgets – it’s just that for a spice rack project, I’ll stick to PEAR libraries. At least until the spice rack is re-spec’d to be a spice rack attached to a breeder reactor that smells like daisies in summer and acts as a supercomputer for SETI every solstice and equinox…


04
Jan 08

Multiple databases in Drupal

Have to say, while MDB2 has the more straightforward way of accessing multiple databases (just create more database objects using MDB2::factory()), drupal’s way of doing things is a long way from horrible.

To initialise:
[ccN lang=”php”]$db_url[‘default’] = ‘mysql://drupal:drupal@localhost/drupal’;
$db_url[‘mydb’] = ‘mysql://user:pwd@localhost/anotherdb’;
$db_url[‘db3’] = ‘mysql://user:pwd@localhost/yetanotherdb’;[/cc]
And then to use:
[ccN lang=”php”]db_set_active(‘mydb’);
db_query(‘SELECT * FROM table_in_anotherdb’);
//Switch back to the default connection when finished.
db_set_active(‘default’);[/cc]

Quite straightfoward looking. Now to see if it actually works! 🙂