onedumbcoder Posted July 22, 2009 Share Posted July 22, 2009 How do I protect against the % character in a LIKE %$searchtearm% Link to comment https://forums.phpfreaks.com/topic/166942-how-do-you-protect-against-a/ Share on other sites More sharing options...
jayjay960 Posted July 22, 2009 Share Posted July 22, 2009 Do you mean to escape it so it's treated like a normal character? \% The backslash is used to escape characters in most programming languages (eg echo 'abc\'def'; in PHP will show as abc'def ) Link to comment https://forums.phpfreaks.com/topic/166942-how-do-you-protect-against-a/#findComment-880211 Share on other sites More sharing options...
onedumbcoder Posted July 22, 2009 Author Share Posted July 22, 2009 will mysql_real_escape_string do that? or is there another function that takes care of that? Link to comment https://forums.phpfreaks.com/topic/166942-how-do-you-protect-against-a/#findComment-880328 Share on other sites More sharing options...
fenway Posted July 24, 2009 Share Posted July 24, 2009 will mysql_real_escape_string do that? or is there another function that takes care of that? The refman is your friend. Link to comment https://forums.phpfreaks.com/topic/166942-how-do-you-protect-against-a/#findComment-882305 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.