sql server - Pdo mssql error messages -
i'm using pdo through freetds driver connect mssql database , i'd output detailed sql errors against generic one. e.g. got generic error pdo
sqlstate[hy000]: general error: 547 general sql server error: check messages sql server [547] (severity 16) [(null)]
but sql client gives me more details, , i'd them in php. e.g. in same case:
the delete statement conflicted reference constraint "fkordiniclienti". conflict occurred in database "dbo.ordini", column 'idcliente' of database "dbname".
i've read old note php / pdo / mssql how error informations? , i'd prefer avoid additional query. thanks.
i think code doesn't matter, know what's wrong in sql, wanted access second code block php.
i solved using odbc driver instead of freetds.
Comments
Post a Comment