⟵ hearthere ⟶
  • Quick start
  • Install MIT
  • Install PRO
  • Updating
  • Optimization
  • Update v4-v5
  • Backups
  • Console utility bin/totum
  • Basics for users
  • Interface and Layout
  • Tables and their parameters
  • Prefilter
  • Fields and their parameters
  • Syntax
  • Code, actions, formatting
  • Relational relationships
  • Calculation order and calculation units
  • Auto-complete calculations and timing
  • Duplicate rows and cycles
  • Comparisons
  • Functions
  • Debugging
  • Print and CSV
  • API
  • Roles and users
  • Notifications
  • Scheduled Actions
  • System tables
  • Trees
  • Anonymous tables
  • External Forms
  • Exporting and importing tables
  • [PRO] MeiliSearch
  • [PRO] Databases
  • General
  • Functions used to connect to external databases
  • [PRO] Custom CSS
  • [PRO] Custom docs
  • [PRO] LDAP AD
  • [PRO] File versions
  • [PRO] List-unsubscribe
  • [PRO] Dynamic fields
  • [PRO] Only Office
  • [PRO] Auth Tokens
  • [PRO] 2FA
  • [PRO] Superlang
  • [PRO] Daemons
  • [PRO] Profiler
  • Connecting functions
  • [SRV] Installation and Connection
  • [SRV] Export, PDF, Upload, and Preview
  • [SRV] XLSX/DOCX Generators
  • PRO Database Access Functions

    General

    To access external SQL databases from Totum, you need to fill in the database access details in the ttm__external_databases table.

    The strEncrypt function is used to save and read passwords. To use it, you need to create a Crypto.key file in the root of the Totum installation with the encryption key.

    • name — unique name of the database connection.

    • type — PDO type.

      For MySQL, you need to install the PHP module: apt -y install php8.0-mysql

    • host — the host of the database to which you need to connect. For a remote database, you need to ensure port access and allow remote connections for the host, user, and database.

    • port — connection port.

    • database_name — name of the database.

    • username — username.

    • user_pass — password. Set via set_pass.

    • options — PDO options for the connection.

    Functions used to connect to external databases