which will generate the correct SQL, no matter what the value of $param is. (as long it is possible to generate something, obviously $param can't be an object for example).
Thanks, Harro - I can accept that (though I think there's some inconsistency: am I right in thinking that where('MyField', '=', $param) would handle nulls correctly?).
I was going to suggest a quick mention in the documentation, but the only place I can find where parameters() is documented is a passing reference in the 'query binding' section of 'database usage'.
where('MyField', $param) is a shortcut or alias of where('MyField', '=', $param).
The current DBAL was taken from the Kohana v2 codebase, is over 3 years old, and is at some points difficult to improve.
For Fuel v2 we have written a new DBAL, which is fully PDO based, and fixes a lot of these issues. It also has platform specific drivers, so no issues with other DB's than MySQL. It is correctly production ready.
If you have no requirements for ORM or Model_Crud, you can use the v2 DBAL in your current v1 application today. Just include 'fuelphp/database" in your composer.json.
There are no v2 docs yet, you if you check out the tests and the index.php in https://github.com/fuelphp/database, you should be able to figure out how it works.