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

DBAL: Pass extra connection options to pdo_pgsql

How do I pass extra connection options, like connect_timeout, keepalives, etc.. with DBAL? Should it be passed as driverOptions or a pull request created for explicit support at Doctrine\DBAL\Driver\PDOPgSql\Driver ? I tried passing via…
Mykola Gurov
  • 8,517
  • 4
  • 29
  • 27
0
votes
1 answer

Should I use Connection::executeUpdate()?

I use Doctrine DBAL v2.5.0 and I would like to perform a simple update statement. In the documentation it is written that I should use the method executeUpdate()…
Daniel Mecke
  • 984
  • 10
  • 19
0
votes
1 answer

Getting doctrine dbal is null on app initialization

I was using Authentication success handler to populate some values on session on every success login. I wanted some database operation to be done so i pass @doctrine.dbal.default_connection from my config file. Here is my config file where i…
0
votes
1 answer

Insert record with Doctrine Query Builder

I want to use Doctrine's DBAL Query Builder to insert record into database. I've found that this in fact is possible in the latest documentation via insert…
Slava Fomin II
  • 26,865
  • 29
  • 124
  • 202
0
votes
0 answers

Doctrine DBAL Shared Entity Repository Best Practice

I have been working on a number of PHP projects (web site, polling scripts, AMQP services, etc) and all are related to each over so there is some overlap in the database schema. So far i've been using Doctrine DBAL to both generate my schema (using…
puppyFlo
  • 445
  • 4
  • 16
0
votes
1 answer

Get a Sql Server error on Order By - Symfony2

Using Symfony with Sql Server and from what I've read, it seems that the connection to the database is not stable. As soon as I use the orderBy method I get an error : Here's an example : $qStores = $this->getManager() …
Neufman
  • 3
  • 3
0
votes
1 answer

When I try to change the default fetch style with Silex framework I get "MysqliException: Unknown fetch type 'FETCH_ASSOC'"

I am doing some tests with Silex to develop a REST API but I encounter an issue when I am fetching data from database. MysqliException: Unknown fetch type 'FETCH_ASSOC'" When I do not add give any fetch type I receive the data correctly with…
bzin
  • 1,921
  • 2
  • 14
  • 15
0
votes
1 answer

Update records dbal innodb silex

i have a Problem with silex an doctrine dbal $update_sql = "UPDATE ca_mailing SET aktiviert = 2"; $count= $app['db']->executeUpdate($update_sql, array()); echo "$count count"; -> 2 Records in Database, echo outs 2 -> The Records are not updated.…
0
votes
0 answers

How execute a stored procedure in silex with dbal (doctrine)?

I was looking for this information on the site http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html - but have not found anything. I tried to write in the style of PDO and a got syntax…
0
votes
1 answer

How do you escape oracle reserved keywords when using Doctrine DBAL to execute queries on an Oracle database?

I'm trying to use Doctrine DBAL to execute the following query on an Oracle database. I've executed other queries before so it's not a connection issue. The problem stems from trying to escape the reserved word Number. I need to select a column as…
thed0ctor
  • 1,350
  • 4
  • 17
  • 34
0
votes
2 answers

how to create doctrine mongodb connections via DriverManager

Is there a way to create mongodb connection using doctrine's DriverManager::getConnection() method? Most of examples use yaml file to configure connections. I am looking for a way to make doctrine-mongodb connections only with php code.
Muatik
  • 4,011
  • 10
  • 39
  • 72
0
votes
3 answers

Symfony2-Doctrine -- Selecting data with WHERE from DoctrineArray

In an entity I have a field that looks like this: /** * @ORM\Column(type="array") */ protected $category; and QueryBuilder $qb = $this->createQueryBuilder('s'); $qb->select($fields) ->where( 's.category IN (:category)') //////////// <---- …
0
votes
1 answer

PHP ZF2 Doctrine edit record fails with empty data

Since we resolved my last problem (special thanks to ChandlerTi) I've been trying to update my code, to edit and safely delete database records using ZF2 and Doctrine. Now I've stuck on the edit function related problem. When i click on the edit…
Smok
  • 101
  • 2
  • 11
0
votes
1 answer

Doctrine2 Multiple DBs without Symfony2?

I know that using the Doctrinebundle in Symfony2 it is possible to instantiate multiple DB connections under Doctrine... $connectionFactory = $this->container->get('doctrine.dbal.connection_factory'); $connection =…
ehime
  • 8,025
  • 14
  • 51
  • 110
0
votes
1 answer

Symfony2: How to change Entity Manager just before doing login_check

I've two dbal connections. One static, defined in config.yml, and one defined dynamically. When I need it in a controller I set the connection parameters, such as host, database name, password, etc... I need to set the dynamic connection just before…
2ehr
  • 53
  • 6
1 2 3
17
18