php/php-src — pull request #432 by navarr (2013-09-05 18:03:56+00:00)
Title: Addition of DATE_SQL and DATE_SQLTIMESTAMP constants

This is a proposed pull request to add DATE_SQL and DATE_SQLTIMESTAMP constants to PHP.

Are these useful? Maybe. Are they necessary? No. Is it too much bloat? No idea.

This seems to be the normal format for MySQL, PostgreSQL, and MSSQL. The reason this branch exists is because a coworker thought it odd how heavily intertwined PHP and SQL are, and yet whenever you want to format a date or timestamp for SQL you have to type out the format yourself.

And so this was born.