Category : mysql

I just started with the symfony framework I installed the environment without problem but when I run the symfony server for the first time with: symfony server: start I get an error like this [Web server] [07-Apr -2021 06:27:42 Europe / Berlin] 2021-04-07T06: 27: 42 + 02: 00 [critical] Error not caught: syntax error, "|" ..

Read more

I am trying to figure out how to count instalments attached to the contract and then return it in the result if there are less than 2. ->select(‘cc’) ->addSelect(‘COUNT(cci) AS HIDDEN numberOfInstalments’) ->from(‘AppBundle:ClientContract’, ‘cc’) ->innerJoin(‘AppBundle:ClientContractInstalment’, ‘cci’, ‘WITH’, ‘cci.clientContract = cc’) ->andHaving(‘numberOfInstalments < :numberOfRequiredInstalments'( ->setParameter(‘numberOfRequiredInstalments’, 2) ->getResult() The code from above works well when I add ..

Read more

I have the following code $this->connection->transactional(function () { $data = $this->connection->executeQuery(‘SELECT * FROM faq_questions’)->fetchAll(); $faqs = $this->connection->executeQuery(‘SELECT * FROM faq’)->fetchAll(); $countries = $this->connection->executeQuery(‘SELECT * FROM countries’)->fetchAll(); foreach ($faqs as $faq) { foreach ($countries as $country) { foreach ($data as $datum) { if ($datum[‘faq_id’] === $faq[‘id’]) { $stmt = $this->connection->prepare(‘INSERT INTO faq_questions …’); $stmt->execute([…]); } } ..

Read more