does anyone know how to trap error messages that mysql generates, when coding with php? i want to stop mysql from printing to a page its error messages (like the "0 is not an index" error for a bad database connection attempt), and instead create user friendly messages and options.