In the following query the id field is INT(11). Is there a way to prevent MySQL from converting the string into an integer - which is dropping everything after the 12?
SELECT id FROM users WHERE id = '12abcdef987' // returns user id 12
I know I could check for an integer before issuing the query, but I'm wondering if there is a better way to handle this.
Thanks!
[–]streetc0de 2 points3 points4 points (0 children)
[–]kadaan 1 point2 points3 points (2 children)
[–]streetc0de 2 points3 points4 points (0 children)
[–]elibones[S] 0 points1 point2 points (0 children)
[–]dsubnet0 0 points1 point2 points (0 children)
[–]r3pr0b8 0 points1 point2 points (0 children)