Snippet: Symfony & Propel - Queries with SQL functions

This is a super short snippet that I ALWAYS forget how to do! Often I want to build more complex where clauses with Propel Criteria which use SQL functions such as UCASE, LCASE, LEN and the date functions DAY, MONTH and YEAR. This is possible using Propel & Criteria, but…

Snippet: Symfony Forms - Accessing the Object in a Form

Perusing my Google Analytics data shows up some interesting results. For starters the top search query which sends people to my blog is "symfony accessing object in a form". This has been consistent for several months, but there is no article on my blog which answers that question. I imagine…

Snippet: Creating & Debugging Complex SQL queries in Symfony

When working with large and complex datasets in Symfony, there comes a point where the ORM layer (Propel or Doctrine) causes more problems than it solves. Sometimes it's necessary to debug large SQL queries built using the ORM layer, and at other times it'sĀ appropriate to bypass the ORM layer…

Snippet: Symfony Forms - Allowing Extra Fields

Place this line of code in the configure method of a Symfony form to allow the saving of additional fields. This is used when additional information or inputs are needed in the form which are not saved in their own fields in the database. Examples are data which might be…