Liquid Fire Posted March 11, 2008 Share Posted March 11, 2008 when is the where if id is an int field is WHERE id = 123 better than WHERE id= '123' ? Link to comment https://forums.phpfreaks.com/topic/95647-intstring-equality-question/ Share on other sites More sharing options...
trq Posted March 11, 2008 Share Posted March 11, 2008 What? Link to comment https://forums.phpfreaks.com/topic/95647-intstring-equality-question/#findComment-489698 Share on other sites More sharing options...
Liquid Fire Posted March 11, 2008 Author Share Posted March 11, 2008 I wish i could edit that, WOW, really really sorry about that. I bet you could never guess English it my first language. What i mean was: Lets say i have an id field that is type INT, would: WHERE id = 123 be better than: WHERE id= '123' ? Link to comment https://forums.phpfreaks.com/topic/95647-intstring-equality-question/#findComment-489709 Share on other sites More sharing options...
fenway Posted March 11, 2008 Share Posted March 11, 2008 MySQL will handle the type "conversion" if necessary -- the quotes prevent SQL injection attacks. Link to comment https://forums.phpfreaks.com/topic/95647-intstring-equality-question/#findComment-489738 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.