returning error from mysql