Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
キー制約エラーのために挿入に失敗した場合、エラー テキストの文字列解析を行わずにキーの名前を取得する方法はありますか?
エラー コードが 1062 であることは既にわかっています。どのキー制約が失敗したかを知りたい:)
「エラーテキストの文字列解析を行わずに?」-いいえ、私が知る限り、次のようなことをしています
preg_match("/for key '(.+)'$", $msg, $matches)
あなたの最高のチャンスです。