Coding with SPIP 2.1
SPIP 2.1 Technical Documentation

> > > > sql_errno

sql_errno

The sql_errno() functions returns the number code for the most recent SQL error that has occurred. This function is used in SPIP to automatically record the details in the incident logs generated for SQL actions, which are centrally managed by the spip_sql_erreur() function in ecrire/base/connect_sql.php