Method Sql.pgsql()->error()
- Method
error
finalstringerror(void|intclear)- Returns
The textual description of the last server-related error. Returns
0if no error has occurred yet. It is not cleared upon reading (can be invoked multiple times, will return the same result until a new error occurs).During the execution of a statement, this function accumulates all non-error messages (notices, warnings, etc.). If a statement does not generate any errors, this function will return all collected messages since the last statement.
- Note
The string returned is not newline-terminated.
- Parameter
clear To clear the error, set it to
1.- See also