# \#laminas-db

**URL:** https://discourse.laminas.dev/tag/laminas-db/44.md

[Latest](https://discourse.laminas.dev/latest.md) · [Categories](https://discourse.laminas.dev/categories.md) · [Tags](https://discourse.laminas.dev/tags.md)

---

## [Laminas-db compatibility with PHP8.4](https://discourse.laminas.dev/t/laminas-db-compatibility-with-php8-4/3937)

<div class="topic-metadata">

**Author:** [@Roland\_Lang](https://discourse.laminas.dev/u/Roland_Lang)\
**Replies:** 17\
**Last updated:** [July 25, 2026, 6:54am UTC](https://discourse.laminas.dev/t/laminas-db-compatibility-with-php8-4/3937 "2026-07-25T06:54:14Z")

</div>

Hello everybody, we are using Laminas-DB and are in the process of upgrading to PHP8.4. Laminas-DB requires versions 8.1, 8.2 and 8.3. Is there a timeline when Laminas-DB will be available for PHP 8.4? Thank you for y…

---

## [Askerakbar/lens - simple SQL query logger for Laminas MVC](https://discourse.laminas.dev/t/askerakbar-lens-simple-sql-query-logger-for-laminas-mvc/3942)

<div class="topic-metadata">

**Author:** [@Asker\_Akbar](https://discourse.laminas.dev/u/Asker_Akbar)\
**Replies:** 1\
**Last updated:** [July 30, 2025, 9:29am UTC](https://discourse.laminas.dev/t/askerakbar-lens-simple-sql-query-logger-for-laminas-mvc/3942 "2025-07-30T09:29:06Z")

</div>

Just shipped a small side project: Lens it is a simple SQL query logger for Laminas MVC. What it does: Logs every DB query in your app (with timing, bindings, stack trace, etc.) Clean UI at /lens to browse and sea…

---

## [$this-\>tableGateway-\>update](https://discourse.laminas.dev/t/this-tablegateway-update/3877)

<div class="topic-metadata">

**Author:** [@Jilco](https://discourse.laminas.dev/u/Jilco)\
**Replies:** 2\
**Last updated:** [March 25, 2025, 12:51pm UTC](https://discourse.laminas.dev/t/this-tablegateway-update/3877 "2025-03-25T12:51:28Z")

</div>

I’m struggling with how to update a single column in a row set with tablegateway. I can update the whole row with passing the object, but how to update a single value in the row? I want to set “status” to 2 where “ID” …

---

## [Is it possible to set multiple values to Laminas SQL from function?](https://discourse.laminas.dev/t/is-it-possible-to-set-multiple-values-to-laminas-sql-from-function/3776)

<div class="topic-metadata">

**Author:** [@eguvenc](https://discourse.laminas.dev/u/eguvenc)\
**Replies:** 1\
**Last updated:** [September 25, 2024, 9:20pm UTC](https://discourse.laminas.dev/t/is-it-possible-to-set-multiple-values-to-laminas-sql-from-function/3776 "2024-09-25T21:20:05Z")

</div>

I am trying to convert this sql code into Laminas way ? Is it possible to set multiple values ​​to Laminas SQL from function ? SELECT node.name, (COUNT(parent.name) - 1) AS depth FROM categories AS node, catego…

---

## [Laminas authentication using lmcuser package with custom db adaper](https://discourse.laminas.dev/t/laminas-authentication-using-lmcuser-package-with-custom-db-adaper/3752)

<div class="topic-metadata">

**Author:** [@Praveen\_Maurya](https://discourse.laminas.dev/u/Praveen_Maurya)\
**Replies:** 2\
**Last updated:** [August 12, 2024, 2:08pm UTC](https://discourse.laminas.dev/t/laminas-authentication-using-lmcuser-package-with-custom-db-adaper/3752 "2024-08-12T14:08:36Z")

</div>

My Zendframework2 application is working fine in the php 7.4 and i have to update it to support php 8.1 and for that i am migrating zf2 to laminas. It was zfcuser implemented in the ZF2. Currently i am replacing zfcuser …

---

## [Laminas MVC Framework Course Free for Beginners on Udemy](https://discourse.laminas.dev/t/laminas-mvc-framework-course-free-for-beginners-on-udemy/3728)

<div class="topic-metadata">

**Author:** [@Pulecode](https://discourse.laminas.dev/u/Pulecode)\
**Replies:** 2\
**Last updated:** [July 11, 2024, 9:57am UTC](https://discourse.laminas.dev/t/laminas-mvc-framework-course-free-for-beginners-on-udemy/3728 "2024-07-11T09:57:56Z")

</div>

Hello everyone. I have created a course on Udemy that I wish to give away to beginners who wish to learn how to build a website using the Laminas MVC Framework, MySQL and Bootstrap 5. What you will learn is: how to c…

---

## [Encrypt database parameter in config files](https://discourse.laminas.dev/t/encrypt-database-parameter-in-config-files/3726)

<div class="topic-metadata">

**Author:** [@ebuddy](https://discourse.laminas.dev/u/ebuddy)\
**Replies:** 4\
**Last updated:** [July 6, 2024, 7:56pm UTC](https://discourse.laminas.dev/t/encrypt-database-parameter-in-config-files/3726 "2024-07-06T19:56:45Z")

</div>

Hi everyone, I would like to know if someone tried to encrypt the database credentials stored in the config files ? Or How can we make it possible ? Best regards

---

## [Laminas-db sqlsrv exceptions, how to read error text](https://discourse.laminas.dev/t/laminas-db-sqlsrv-exceptions-how-to-read-error-text/3356)

<div class="topic-metadata">

**Author:** [@terok](https://discourse.laminas.dev/u/terok)\
**Replies:** 5\
**Last updated:** [May 23, 2024, 7:36pm UTC](https://discourse.laminas.dev/t/laminas-db-sqlsrv-exceptions-how-to-read-error-text/3356 "2024-05-23T19:36:02Z")

</div>

My app uses laminas-db and SQL Server. When there’s a SQL error condition, this code in src\\Adapter\\Driver\\Sqlsrv\\Connection handles it: // if the returnValue is something other than a Sqlsrv\_result, bypass wra…

---

## [Can Laminas manage the ilike operator?](https://discourse.laminas.dev/t/can-laminas-manage-the-ilike-operator/3673)

<div class="topic-metadata">

**Author:** [@laureuh](https://discourse.laminas.dev/u/laureuh)\
**Replies:** 3\
**Last updated:** [April 26, 2024, 12:25pm UTC](https://discourse.laminas.dev/t/can-laminas-manage-the-ilike-operator/3673 "2024-04-26T12:25:50Z")

</div>

Hello everyone, I’m working on Laminas with a postgresql database. I noticed in the Laminas packages that operators such as between, like, etc. could be managed. Except that I can’t find anything on the ilike specific …

---

## [Question about Result::$statementMode](https://discourse.laminas.dev/t/question-about-result-statementmode/3663)

<div class="topic-metadata">

**Author:** [@Tyrsson](https://discourse.laminas.dev/u/Tyrsson)\
**Replies:** 3\
**Last updated:** [April 9, 2024, 1:29am UTC](https://discourse.laminas.dev/t/question-about-result-statementmode/3663 "2024-04-09T01:29:58Z")

</div>

How would one go about changing the statement mode for the laminas adapter driver pdo result? I see there is two class constants that define the statement mode, but there is no setter to allow modifying which mode the Re…

---

## [How add sslmode attribute with laminas-db](https://discourse.laminas.dev/t/how-add-sslmode-attribute-with-laminas-db/3652)

<div class="topic-metadata">

**Author:** [@shishi666](https://discourse.laminas.dev/u/shishi666)\
**Replies:** 1\
**Last updated:** [April 2, 2024, 9:16am UTC](https://discourse.laminas.dev/t/how-add-sslmode-attribute-with-laminas-db/3652 "2024-04-02T09:16:06Z")

</div>

Good morning, I use the laminas-db component to query my Postgres database in a web application. We recently made ssl mandatory when connecting to the Postgres server and I can’t find any information in the laminas-db d…

---

## [How to I insert into one database/table data from a select from another database/table?](https://discourse.laminas.dev/t/how-to-i-insert-into-one-database-table-data-from-a-select-from-another-database-table/3637)

<div class="topic-metadata">

**Author:** [@COMCDUARTE](https://discourse.laminas.dev/u/COMCDUARTE)\
**Replies:** 5\
**Last updated:** [March 17, 2024, 4:15pm UTC](https://discourse.laminas.dev/t/how-to-i-insert-into-one-database-table-data-from-a-select-from-another-database-table/3637 "2024-03-17T16:15:27Z")

</div>

Project: I have a separate production and development database. Periodically I’d like to update most of the data in development with recent entries in production. Currently I’ve been relying on MySQL procedures which s…

---

## [How to prepare data from SQL for nested hydrator strategy](https://discourse.laminas.dev/t/how-to-prepare-data-from-sql-for-nested-hydrator-strategy/3626)

<div class="topic-metadata">

**Author:** [@stark](https://discourse.laminas.dev/u/stark)\
**Replies:** 5\
**Last updated:** [March 16, 2024, 9:59pm UTC](https://discourse.laminas.dev/t/how-to-prepare-data-from-sql-for-nested-hydrator-strategy/3626 "2024-03-16T21:59:47Z")

</div>

Hey guys, let’s imagine we have a Mezzio based REST API app. The data are stored in MariaDB so when retrieving those from DB we get a flat array: Data from DB: \[ 'name', 'surname', 'sample\_1', 'sample\_2',…

---

## [Is it possible to define a public method in a base class without limit the parameter's type and how many parameters input?](https://discourse.laminas.dev/t/is-it-possible-to-define-a-public-method-in-a-base-class-without-limit-the-parameters-type-and-how-many-parameters-input/3560)

<div class="topic-metadata">

**Author:** [@jobsfan](https://discourse.laminas.dev/u/jobsfan)\
**Replies:** 23\
**Last updated:** [January 3, 2024, 9:09am UTC](https://discourse.laminas.dev/t/is-it-possible-to-define-a-public-method-in-a-base-class-without-limit-the-parameters-type-and-how-many-parameters-input/3560 "2024-01-03T09:09:32Z")

</div>

I wanna to define a base class for all my db table class. It is like the following: namespace Application\\Model\\LocalBase; use Laminas\\Db\\TableGateway\\TableGatewayInterface; class TableBase { protected TableGatew…

---

## [How to init Database connection in phpunit Functional test](https://discourse.laminas.dev/t/how-to-init-database-connection-in-phpunit-functional-test/3503)

<div class="topic-metadata">

**Author:** [@rolek](https://discourse.laminas.dev/u/rolek)\
**Replies:** 2\
**Last updated:** [October 18, 2023, 7:13pm UTC](https://discourse.laminas.dev/t/how-to-init-database-connection-in-phpunit-functional-test/3503 "2023-10-18T19:13:44Z")

</div>

Hi everyone! I’m trying to write some functional tests for my application. I found this post Mezzio Example: Functional and Unit Testing - Marc Guyer which got me started somewhat, but the problem I’m having is that whe…

---

## [How to execute unbuffered query](https://discourse.laminas.dev/t/how-to-execute-unbuffered-query/3502)

<div class="topic-metadata">

**Author:** [@rolek](https://discourse.laminas.dev/u/rolek)\
**Replies:** 4\
**Last updated:** [October 18, 2023, 2:39pm UTC](https://discourse.laminas.dev/t/how-to-execute-unbuffered-query/3502 "2023-10-18T14:39:49Z")

</div>

Hi! In my application, there is one query that I need to execute unbuffered, because it returns too many results to fit in memory. I would like to execute this one query unbuffered, while leaving the rest of the queries…

---

## [Query result DateTime field conversion](https://discourse.laminas.dev/t/query-result-datetime-field-conversion/3437)

<div class="topic-metadata">

**Author:** [@montypanday](https://discourse.laminas.dev/u/montypanday)\
**Replies:** 1\
**Last updated:** [August 16, 2023, 4:03am UTC](https://discourse.laminas.dev/t/query-result-datetime-field-conversion/3437 "2023-08-16T04:03:11Z")

</div>

Hi, I am interested to configure laminas to read dates from database as \\DateTime objects. I am surprised it does not do it my default. I am using oracle database. The column type is Date type and laminas result set r…

---

## [How i can use transactions with SQL-Objects?](https://discourse.laminas.dev/t/how-i-can-use-transactions-with-sql-objects/3284)

<div class="topic-metadata">

**Author:** [@Mario](https://discourse.laminas.dev/u/Mario)\
**Replies:** 3\
**Last updated:** [April 12, 2023, 7:24am UTC](https://discourse.laminas.dev/t/how-i-can-use-transactions-with-sql-objects/3284 "2023-04-12T07:24:55Z")

</div>

When I work with statements in laminas-db, no transactions work. I think execute doesn’t use the same connection. Here’s a small example with a table “mails” that has a unique key on the field “email”. If the user “user@…

---

## [Laminas-db Metadata column errata](https://discourse.laminas.dev/t/laminas-db-metadata-column-errata/3174)

<div class="topic-metadata">

**Author:** [@wiryonolau](https://discourse.laminas.dev/u/wiryonolau)\
**Replies:** 0\
**Last updated:** [January 26, 2023, 11:40pm UTC](https://discourse.laminas.dev/t/laminas-db-metadata-column-errata/3174 "2023-01-26T23:40:43Z")

</div>

Hi in metadata what is the intended purpose for variable $erratas, For mysql currently it save permitted\_values key. For other it save empty array From what I see it is kind of as catch all variable that can be set dif…

---

## [Laminas-db sql cross join](https://discourse.laminas.dev/t/laminas-db-sql-cross-join/3156)

<div class="topic-metadata">

**Author:** [@wiryonolau](https://discourse.laminas.dev/u/wiryonolau)\
**Replies:** 1\
**Last updated:** [January 13, 2023, 7:30am UTC](https://discourse.laminas.dev/t/laminas-db-sql-cross-join/3156 "2023-01-13T07:30:04Z")

</div>

Hi Is there a way to write cross join using current laminas-db ? There is no option to write multiple table in $select-\>from()

---

## [Warning: Undefined array key "db" AdapterServiceFactory.php on line 21](https://discourse.laminas.dev/t/warning-undefined-array-key-db-adapterservicefactory-php-on-line-21/3139)

<div class="topic-metadata">

**Author:** [@leo](https://discourse.laminas.dev/u/leo)\
**Replies:** 1\
**Last updated:** [December 19, 2022, 7:11am UTC](https://discourse.laminas.dev/t/warning-undefined-array-key-db-adapterservicefactory-php-on-line-21/3139 "2022-12-19T07:11:34Z")

</div>

Hi! I’m new at laminas right now. I have 2 questions. Firstly this error which i have, what does it mean? in AdapterServiceFactory.php i have this code public function \_\_invoke(ContainerInterface $container, $requested…

---

## [Multiple DB Adapter](https://discourse.laminas.dev/t/multiple-db-adapter/3125)

<div class="topic-metadata">

**Author:** [@mwcode](https://discourse.laminas.dev/u/mwcode)\
**Replies:** 3\
**Last updated:** [December 6, 2022, 9:28am UTC](https://discourse.laminas.dev/t/multiple-db-adapter/3125 "2022-12-06T09:28:24Z")

</div>

Hi, i need two DB Adapters for my application. If i try like the documentation i get the errors. Have anyone a sample for me?

---

## [How to force an index in a SQL query?](https://discourse.laminas.dev/t/how-to-force-an-index-in-a-sql-query/3109)

<div class="topic-metadata">

**Author:** [@Fabian\_Rahm](https://discourse.laminas.dev/u/Fabian_Rahm)\
**Replies:** 1\
**Last updated:** [November 17, 2022, 3:04pm UTC](https://discourse.laminas.dev/t/how-to-force-an-index-in-a-sql-query/3109 "2022-11-17T15:04:52Z")

</div>

I try to speed up some SQL queries and would love to add a “FORCE INDEX (indexName)” into a query while using the TableGateway pattern - does laminas-db provide any method to do so without writing raw queries?

---

## [About mvc db connection, mysqlAdapter](https://discourse.laminas.dev/t/about-mvc-db-connection-mysqladapter/3042)

<div class="topic-metadata">

**Author:** [@jobsfan](https://discourse.laminas.dev/u/jobsfan)\
**Replies:** 8\
**Last updated:** [September 24, 2022, 11:53am UTC](https://discourse.laminas.dev/t/about-mvc-db-connection-mysqladapter/3042 "2022-09-24T11:53:31Z")

</div>

I got return \[ 'db' =\> \[ 'driver' =\> 'Pdo', 'adapters' =\> \[ mysqlAdapter::class =\> \[ 'driver' =\> 'Pdo', 'dsn' =\> 'mysql:dbname=your\_database\_name;host=yo…

---

## [Can we add Schema for table\_name in a CredentialTreatmentAdapter for authentification?](https://discourse.laminas.dev/t/can-we-add-schema-for-table-name-in-a-credentialtreatmentadapter-for-authentification/3002)

<div class="topic-metadata">

**Author:** [@Dautheville.dylan](https://discourse.laminas.dev/u/Dautheville.dylan)\
**Replies:** 5\
**Last updated:** [August 19, 2022, 6:19am UTC](https://discourse.laminas.dev/t/can-we-add-schema-for-table-name-in-a-credentialtreatmentadapter-for-authentification/3002 "2022-08-19T06:19:57Z")

</div>

Hello, I work to a migration of an old app who running with ZF1 and I have a problem for authentification with authentification with a CredentialTreatmentAdapter. In fact my table where’s I have my ID and password is i…

---

## [Can laminas-db handle MySQL data type POINT?](https://discourse.laminas.dev/t/can-laminas-db-handle-mysql-data-type-point/3013)

<div class="topic-metadata">

**Author:** [@Fabian\_Rahm](https://discourse.laminas.dev/u/Fabian_Rahm)\
**Replies:** 3\
**Last updated:** [August 16, 2022, 1:37pm UTC](https://discourse.laminas.dev/t/can-laminas-db-handle-mysql-data-type-point/3013 "2022-08-16T13:37:54Z")

</div>

I am adding coordinates using the POINT data type to my application. I haven’t found anything related to that in the codebase. How would one go to use (CRUD) that data type while using laminas-db and the TableGateway pat…

---

## [Database migrations](https://discourse.laminas.dev/t/database-migrations/2960)

<div class="topic-metadata">

**Author:** [@JohnyProkie](https://discourse.laminas.dev/u/JohnyProkie)\
**Replies:** 1\
**Last updated:** [July 13, 2022, 3:56pm UTC](https://discourse.laminas.dev/t/database-migrations/2960 "2022-07-13T15:56:36Z")

</div>

Hello there! I will need to utilize database, but I haven’t found a word about database migrations in documentation. I was looking in laminas-db module and tried to find other modules in case there is another one (unlik…

---

## [Simple creation of pdo db connection within model](https://discourse.laminas.dev/t/simple-creation-of-pdo-db-connection-within-model/2898)

<div class="topic-metadata">

**Author:** [@iwidgit](https://discourse.laminas.dev/u/iwidgit)\
**Replies:** 1\
**Last updated:** [May 31, 2022, 7:10am UTC](https://discourse.laminas.dev/t/simple-creation-of-pdo-db-connection-within-model/2898 "2022-05-31T07:10:26Z")

</div>

Is it possible to instantiate a db adapter inside a model using laminas\\db. I’m using the pdo driver with mysql. I have tried using laminas\\db\\adapter supplying dns username and password but not connecting. I must be mis…

---

## [Help to create listener](https://discourse.laminas.dev/t/help-to-create-listener/2787)

<div class="topic-metadata">

**Author:** [@Joao\_Santos](https://discourse.laminas.dev/u/Joao_Santos)\
**Replies:** 5\
**Last updated:** [April 8, 2022, 7:03am UTC](https://discourse.laminas.dev/t/help-to-create-listener/2787 "2022-04-08T07:03:51Z")

</div>

Hi, I have an application and I would like to create a listener to listen for events referring to the select, insert, update and delete of the EventFeature, please does anyone have any ideas or suggestions on how to make…

---

## [Is "laminas-db" abandoned?](https://discourse.laminas.dev/t/is-laminas-db-abandoned/2721)

<div class="topic-metadata">

**Author:** [@ZVanoZ](https://discourse.laminas.dev/u/ZVanoZ)\
**Replies:** 11\
**Last updated:** [March 24, 2022, 6:11pm UTC](https://discourse.laminas.dev/t/is-laminas-db-abandoned/2721 "2022-03-24T18:11:18Z")

</div>

Today we have 15 opened pull request and 11 opened issues. But we have no reaction of comunity. Last merge was 4 monch ago. Unit tests have errors. Tests for Oracle not support. Version 3 not activity since 31 Dec …

[Next page](https://discourse.laminas.dev/tag/laminas-db/44.md?match_all_tags=true&page=1&tags%5B%5D=laminas-db)
