How to Use Named Variables with Postgres and PHP PDO Driver
You can write reusable scripts with Postgres by taking advantage of named variables.
A named variable starts with a `:` in your sql script. Here is an example
You can then use this statement with `psql` and the `--variable` fl...
How to Generate a UUID in PHP
Here is a little snippet for generating a UUID in PHP
$data = random_bytes(16);
$data = chr(ord($data) & 0x0f | 0x40);
$data = chr(ord($data) & 0x3f | 0x80);
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_sp...
My Review of Moodle 1.9 Extension Development
I wrote a review for Joseph Thibault's Moodle News on extension development for Moodle. The book is quite good and I think an essential resource for anyone wanting to develop in Moodle. The book focuses on plugin development, but it will also give you an ...