0x27 is the ASCII code for a single quote, yes.
And yes, someone was probably trying to see if your script was vulnerable to SQL injection attacks. It shouldn't be, because you should never be placing user-supplied data directly into a SQL query string. Instead, you must first sanitize it with a function such as [man]mysql_real_escape_string/man (for string data, which doesn't appear appropriate in your case, since 'id' is most likely expected to be a numeric value).