Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite don't support "SET NAMES utf8" statement #111

Open
yangqingrong opened this issue Jun 22, 2024 · 1 comment
Open

sqlite don't support "SET NAMES utf8" statement #111

yangqingrong opened this issue Jun 22, 2024 · 1 comment

Comments

@yangqingrong
Copy link

try {
            $this->pdo = new PDO($dsn, $config['username'], $config['password']);
            //I add this block to avoid exception
            if( !in_array($config['driver'],['sqlite'])){
                $this->pdo->exec("SET NAMES '" . $config['charset'] . "' COLLATE '" . $config['collation'] . "'");
                $this->pdo->exec("SET CHARACTER SET '" . $config['charset'] . "'");
            }
           // ...
@izniburak
Copy link
Owner

Thanks for the issue. I'll check it and plan to release new version that contain related fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants