I'm currently having a look whether this might be a problem to use the id w/o typecast, considering MySQL string comparison vulnerabilities earlier this year.