Reputation: 19207
How do I add the SQL wildcard characters to this:
sprintf("SELECT robot FROM robots WHERE robot LIKE '%s'",strtolower($user_agent));
as
sprintf("SELECT robot FROM robots WHERE robot LIKE '%%s%'",strtolower($user_agent));
I need the %s
placeholder to be wrapped in literal %
characters without disrupting the placeholder.
Upvotes: 3
Views: 336