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

Doctrine2 - How to add custom DBAL driver?

In my symfony 3.3.2 project , I want to connect to sage database using odbc sage. I create a new dsn named : GestCom_Sage100. I tried to connect to this dataSource using symfony but I got this error : The given 'driver' SAGE Gestion commeriale 100…
Sabra
  • 177
  • 2
  • 19
0
votes
1 answer

DBAL inside of for loop doesn't work properly

I created a function inside a longer plug-in for shopware, which is supposed to create a random number for every row in the database that has a "NULL" value in the "vouchercode" column. Right now I replaced the for-loop condition with a fixed…
0
votes
1 answer

doctrine/dbal not getting installed in Heroku

I am running a Laravel project on Heroku. For running a migration that will change the type of a column I need the doctrine/dbal package installed. I put "doctrine/dbal": "^2.5" line in composer.json in the "require" object. When I pushed the…
Jimut
  • 195
  • 3
  • 13
0
votes
2 answers

Symfony2 + DBAL. How to use bindValue for multiple insert?

I'm using DBAL and I want to execute multiple insert query. But I have the problem: bindValue() method not working in loop. This is my code: $insertQuery = "INSERT INTO `phonebook`(`number`, `company`, `user`) VALUES %s ON DUPLICATE…
Sergio Ivanuzzo
  • 1,820
  • 4
  • 29
  • 59
0
votes
0 answers

Out Of Memory Exception Xampp

I have this function : public function RemplirTab($nomCol) { $username = $this->getDb()->getUsername(); $sql = "SELECT DISTINCT $nomCol FROM nautilus_users_page, nautilus_users_acces, nautilus_users_droit, nautilus_users_privilege,…
DARLAIVE
  • 1
  • 4
0
votes
0 answers

Update to Symfony 2.8 SQLSTATE exception

Today I updated one of my projects to the new symfony version 2.8 since the update the shell is trowing this exception when running the cache:clear command: An exception occured in driver: SQLSTATE[HY000] [2002] Can't connect to local MySQL…
Nickolaus
  • 4,785
  • 4
  • 38
  • 60
0
votes
2 answers

DBAL connect immediately

In PDO (And likewise DBAL) if there's a problem authenticating with the server it will throw an exception containing a trace including the database username and password. Needless to say, this is a problem, and in PDO I would wrap it in a try block…
J V
  • 11,402
  • 10
  • 52
  • 72
0
votes
1 answer

Iteration DBAL Doctrine

Im trying to count a column one up with the dbal connection. $conn->update("test ", array("feld_number"=>"feld_number+1"), array("art"=>'SYSTEM',"feld"=>'XML',"feld_key"=>0)); This is the error i get: An exception occurred while executing 'UPDATE…
0
votes
1 answer

Undefined class and method using Doctrine

I've been brought into a project and trying to duplicate the project locally. I have XAMPP set up on my machine, but I'm having a difficult time getting the path right. On the server the set up has the Doctrine library above the public_html folder.…
0
votes
1 answer

Symfony2 | Error: Invalid serialization data for datetime object

I've been seeing this error in my logs for a couple of days ago when I did a composer update of my project.   [2015-09-28 17:51:21] php.CRITICAL: Fatal Error: Invalid serialization data for DateTime object Is it a bug Symfony2?
Borja Pombo
  • 525
  • 1
  • 7
  • 30
0
votes
1 answer

Doctrine DBAL and sqlite problems

I am trying to connect to sqlite database file with Doctrine DBAL. 'sqlite:///crawls.db', ]; $conn =…
0
votes
2 answers

Symfony2 Entity with DBAL (No ORM)

I'm working on a SF2 project where I can't use Doctrine2 as ORM, meaning that I already have a database with tables and data. I have to use plain SQL in my controller (I'm currently using DBAL to do that), and I have to create object in order to…
YukiAsuna
  • 92
  • 9
0
votes
1 answer

Receiving delayed data when doing a SELECT over a table which has received an INSERT in MariaDB

I am using MariaDB in a PHP application. The problem is the following: using Doctrine DBAL with the MySQL adaptor I do an insert from one page and then redirect to another one, in which a SELECT is done. Both are very basic queries. The problem is…
dagilpe
  • 147
  • 1
  • 14
0
votes
1 answer

Silex DoctrineServiceProvider not connecting

I'am building application on Silex, and I'am having some problems on very basic stuff. I used example from official documentation for using doctrine service provider, but no matter what i do $app[ 'db' ]->isConnected() returns false. Here is the…
user3018350
0
votes
1 answer

Doctrine DBAL - Transaction and inserts outside transaction

Hello I have service which works in transactions, it's communicating with remote API and I want to log every request/response in this API, but if main transaction rollback, any logs will be rollbacked too. What I think is to clone DBAL connection.…
CappY
  • 1,510
  • 1
  • 17
  • 32