Column name yhteyshenkilö contains ö which \w doesn't match
without the /u flag. This caused SQL syntax errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Foreign key constraints fail if charset doesn't match between
referencing and referenced tables. Added utf8mb4 to user_companies,
reset_tokens, and login_attempts tables.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PDO extension was not available on CloudLinux/alt-php84 server.
MySQLi is available, so rewrote entire database layer to use it.
Added helper functions (_dbRun, _dbFetchAll, _dbFetchOne, etc.)
that handle named parameter conversion and type binding automatically.
All public db*() function signatures remain identical.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MySQL/PDO doesn't support multiple CREATE TABLE statements in a single
exec() call. Split into an array of individual statements with a loop.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>