> My personal favorite: > public function esc( $value ) { > return mysql_real_escape_string( $value, $this->db ); > } I like: return "'".mysql_real_escape_string( $value, $this->db ),"'"; Otherwise, I might forget to quote the result, rendering the function useless.