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

how check errorInfo #294

Open
makhondi opened this issue May 25, 2019 · 2 comments
Open

how check errorInfo #294

makhondi opened this issue May 25, 2019 · 2 comments

Comments

@makhondi
Copy link

Hi
How do I get errors? errorInfo()

$query = $fluent->insertInto('article')->values($values)->execute();

@liorphp
Copy link

liorphp commented Jun 5, 2019

This is my code:

$fluent->getPdo()->errorCode(); $fluent->getPdo()->errorInfo();

@liorphp
Copy link

liorphp commented Sep 22, 2019

You can set this option for the PDO :
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION

And simply catch the exception.

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