Home / 2008 (Page 6)

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.… Read the rest

Read More

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! 🙂… Read the rest

Read More

4's dead baby

So PHP 4.4.8 is released, and that’s it for the whole PHP 4 line. No further normal releases are due and PHP 4 is no longer supported. Hopefully this will mean that the takeup figures for 5 get a sudden sharp upwards jolt!

It’s going to be interesting to watch as major apps like Drupal change over from having to provide legacy support for PHP4 and can start to use the better object model in 5 – the question will be, will we see an improvement in the quality of coding as the mainstream toolset improves?… Read the rest

Read More