I have table Test: I want result where name is NOT NULL: How can i get with: and in model with: Answer Try this: which is standard SQL syntax. Doctrine doesn’t convert Null values into proper sql.
Tag: symfony1
Delete old migrations differences
How can I delete the old migrations differences? When doing doctrine:generate-migrations-diff I get no problems, but when doing the doctrine:migrate I get problems. It seems as if doctrine is trying …
How do I set a MysQL variable (time_zone) from within doctrine / symfony?
I would like to know how I can set the MySQL time zone to UTC (SET time_zone = ‘UTC’) from within Symfony/Doctrine, so when I call a UNIX_TIMESTAMP() function on a DATETIME field in my query, it returns the UTC unix time and not unix time in the server’s time zone. How can I do this, either automatically upon every
Tracking the views of a given row
I have a site where the users can view quite a large number of posts. Every time this is done I run a query similar to UPDATE table SET views=views+1 WHERE id = ?. However, there are a number of disadvantages to this approach: There is no way of tracking when the pageviews occur – they are simply incremented. Updating