Questions tagged [dbal]

Database Abstraction Layer for Doctrine ORM (PHP)

Database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.

261 questions
0
votes
1 answer

How does DBAL read data that ORM inserts but has not yet “flush”?

For historical reasons, my pattern of running databases using Symfony is mixed. That is, the query uses DBAL and the insert uses ORM. Now you need to write a lot of data to the database. The flush in ORM can help me achieve business at the lowest…
何俊杰
  • 1
  • 1
0
votes
2 answers

Set parameter as int array for where in statement in dbal query builder throws array to string conversion exception

I try to bind parameter : [1, 2] in dbal querybuilder in WHERE IN statement I tried to change $qb->expr()->in() to string version but nothing changed QueryBuilder creation $qb = $this->_em->getConnection()->createQueryBuilder() …
Vytautas Saulis
  • 141
  • 2
  • 6
0
votes
1 answer

Database abstraction layer - What is that?

i have some basic questions about database abstraction layers (dbal). I want to get a better understanding of that. I already know that a dbal is a application programming interface. I use PHP as my basic programming language and MySQL as database,…
ToyRobotic
  • 557
  • 10
  • 30
0
votes
1 answer

My Symfony 3.3 website is displaying blank

When I run my website www.example.com it shows blank. And when I run www.example.com/app_dev.php the following error is displayed. An exception occurred in driver: SQLSTATE[28000] [1045] Access denied for user 'myuser'@'localhost' (using password:…
user9368003
0
votes
1 answer

want to use Doctrine DBAL

I want to use Doctrine DBAL , I downloaded the DBAL folder from a site. and put the folder on my server . and then write this code in my file . use Doctrine\Common\ClassLoader; require 'Doctrine/Common/ClassLoader.php'; $classLoader = new…
XMen
  • 29,384
  • 41
  • 99
  • 151
0
votes
1 answer

How to sort randomly with Doctrine DBAL, TYPO3 and TypoScript

Creating a query by TypoScript in TYPO3 v8 the Doctrine-Framework is already used to create the SQL-query. The following code throws an error but was possible in former TYPO3 versions: lib.myElement = CONTENT lib.myElement { wrap =
David
  • 5,882
  • 3
  • 33
  • 44
0
votes
2 answers

Does an SQL Database return a type, or does the Database Abstraction Layer perform implicit casting? (Propel and php)

A simple Propel query to fetch a result 100 from a column with type VARCHAR returns a string. This is expected behaviour. I am working with a legacy system and know I need to cast these values to a php integer type in order to sort them…
pcgben
  • 726
  • 7
  • 24
0
votes
1 answer

Symfony 3.3.12 migration from AWS / RDS Maria DB 10.0 fail: DBALException

I'm try to migrate a API made with Symfony 3.3.12, installed on AWS using a database with Amazon RDS based on MariaDb MariaDB 10.0.24 On my log get this: [2018-06-23 18:22:52] request.INFO: Matched route "api_login_check".…
abkrim
  • 3,512
  • 7
  • 43
  • 69
0
votes
1 answer

Symfony Beanstalkd lost connection oracle

I have a problem with beanstalkd on a symfony(3.4) project. I have a symfony command used to analyse informations, the analyser is in a while true to keep the command running 24/7. $pheanstalk = new Pheanstalk('127.0.0.1'); while (true) { …
Hussein
  • 53
  • 1
  • 6
0
votes
1 answer

Why running Laravel / Doctrine raw database queries is not the same as using mysql cli?

I have encountered a situation when doing a database migration that contradicted what I thought I knew about php connections to a database. I wanted to change the collation of a column, so I wrote the following statement: ALTER TABLE posts MODIFY…
Noel De Martin
  • 2,779
  • 4
  • 28
  • 39
0
votes
3 answers

Fetch records between 0 and 100 without using between in mysql

I want to fetch records between 0 and 100 in mysql without using between clause, because when I use a query like this $this->db->having('distance between 0 and 100'); I get an error like: You have an error in your SQL syntax; check the manual that…
user8769728
0
votes
1 answer

PDOException in my Laravel application, despite having pdo_mysql installed

I am trying to run a new Laravel app on my sever but I am getting the following error: QueryException (SQL) could not find driver (SQL: select * from settings limit 1) Using the debugbar I can see the error is for PDO: LOG.error: PDOException:…
InvalidSyntax
  • 9,131
  • 20
  • 80
  • 127
0
votes
1 answer

SQL ORDER BY multiple fields with sub orders

I'm trying to make a query to get the list of a students class ordered by the type defined, sex and name. I have the next query: SELECT * FROM STUDENTS ORDER BY FIELD(type, 'b', 'p', 'j', 'i', 'a', 'c', 'v'), FIELD(sex, 'M', 'F'), `name` ASC I'm…
Louis B
  • 306
  • 5
  • 18
0
votes
1 answer

Connect silex 2 dbal connect app engine with cloud sql

I lost several hours trying to connect to cloud SQL from PHP flex env, but I found the answer. I hope this help other people. An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory or Access denied for user…
J261
  • 642
  • 2
  • 6
  • 21
0
votes
1 answer

Doctrine2/DBAL + Postgresql - public. schema missing in Doctrine queries | Empty query's result

on my VPS server queires Doctrine's query responsible for counting executed migrations returns no rows. Problem is weird, using PHPStorm sometimes I also got no results but it happens only when I skip public. schema. I can't set in Doctrine's config…
Maytyn
  • 122
  • 1
  • 10