Dolibarr: Use PDO instead of manually generating SQL-statements

Created on 6 Aug 2020  路  2Comments  路  Source: Dolibarr/dolibarr

Feature Request

I just noticed this extension: https://www.php.net/manual/en/book.pdo.php
I suggest we convert all SQL statements in Dolibarr to use that.

WDYT?

related to: https://github.com/Dolibarr/dolibarr/issues/10054

Discussion

Most helpful comment

  1. PDO takes care of data sanitation.
  2. PDO's Prepared statements are faster when inserting lot of similar information.
  3. Returned datasets are traversable with foreach.

All 2 comments

  1. PDO takes care of data sanitation.
  2. PDO's Prepared statements are faster when inserting lot of similar information.
  3. Returned datasets are traversable with foreach.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dolibarr95 picture dolibarr95  路  5Comments

asolslk picture asolslk  路  4Comments

Nicolas90000 picture Nicolas90000  路  3Comments

TobiasSekan picture TobiasSekan  路  5Comments

sam-anam1 picture sam-anam1  路  4Comments