Skip to main content
Version: 6.5.0

Database communication engine

Starting from version 3.3, YetiForce has a new database communication engine built-in, which we continuously develop and improve together with each new release.

This allows YetiForce to communicate with multiple database engines (DBMS) that are compliant with PDO, such as MariaDB, MySQL, PostgreSQL, MSSQL, SQLite, Oracle, and Cubrid.

It does not yet have all the mechanisms rewritten to be able to fully install the system on another database engine.

Table names

We use prefixes in table name, for example u_#__crmentity_label >> u_yf_crmentity_label. The default prefix is yf_

  • a_yf_encryption = 'admin' (administrator's part)
  • s_yf_multireference = 'admin' (configuration's part)
  • l_yf_sqltime = 'log' (this part only contains logs)
  • o_yf_csrf = 'log' (this part only contains OWASP messages)
  • w_yf_servers = 'portal' (temporary name; this part is only for webservice applications including Portal)

More examples:

Query building basics

Data types



Database connection without primary database parameter

$db = \App\Db::getInstance();
$db = \App\Db::getInstance('base');
$db = \App\Db::getInstance('log');
$db = \App\Db::getInstance('admin');

Downloading data

$query = (new \App\Db\Query())
->select(['id', 'user_name'])
->where(['status' => 'Active'])
->andWhere(['between', 'holidaydate', $date[0], $date[1]]);



$query->createCommand()->queryOne() => $query->one() // get first line
$id = (new \App\Db\Query())->from($tableName)->scalar(); // get value from first line first column

// Full version:
$dataReader = $query->createCommand()->query();
$values = [];
while ($shownerid = $dataReader->readColumn(0)) {
$values[] = $shownerid;

// Short version:
$values = $query->column();


->innerJoin('vtiger_tab', 'vtiger_relatedlists.related_tabid = vtiger_tab.tabid')
->leftJoin('u_yf_announcement_mark', 'u_yf_announcement.announcementid = u_yf_announcement_mark.crmid')