How can I translate this query to Doctrine Query Language Answer Since your query only needs to group by year from a datetime column, you will need the YEAR function, which is not supported by default in DQL. You can install DoctrineExtensions which will add the functionality you need. And then edit the doctrine config file (config/packages/doctrine.yaml) as follow: Now
Tag: symfony
Symfony 5 – “An exception occurred in driver: could not find driver”
I’m currently face to this problem. I am really new beginer at Symfony. Problem : When i create a new db with cli symfony console doctrine:database:create, i am getting these errors : Iam using php 7.4 with xampp and normaly pdo_sql is installed : this is my .env file config : And this is my doctrine.yaml file config : I
Can someone suggest a way to do this query using Doctrine (QueryBuilder) with multiple “where” clause?
I’m new to the QueryBuilder and I’m trying to do a POST request (with a JSON) to retrieve some informations in my database. I’m using array because each property can have several values. Here’s the JSON I’m currently sending : Here’s my database : The request I would like to have : And what I have currently done in Symfony,
How do I get Id in the URL to display comments with Symfony 5?
I’m coding a blog with Symfony 5 and I have issues getting the Id from the URL to display comments from my Database. To sum up : – I have a view “/fiche/{id}” wish displays specific game informations. – People can leave a comment below, the comment goes in Database with a foreign Key named “jeu_id” wish is the game
How to adress variable Columns of SQL query with TWIG
I am trying to address a specific column of a SQL query depending on the value of another row from the query. The result I am getting from the SQL query is something like this: Number | Value1 | …
Symfony doctrine orderby and group by (distinct)
I am trying to get the latest booked courses (unique). I have tried the following with the Doctrine querybuilder: Without the orderby it works but it will traverse the bookings ascending. I need the latest booked courses. With this query I am getting this error: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not