I have a return of any error in php, for example.
QLSTATE [23000]: Integrity constraint violation: 1062 Duplicate entry
I wanted to be able to get this code specific, in this case the 1062
, remembering that getCode
of Exception
it would return 23000
.
I want to know how to know if this particular snippet is contained in this string
.