Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何向其中添加 SQL 通配符:
sprintf("SELECT robot FROM robots WHERE robot LIKE '%s'",strtolower($user_agent));
作为
sprintf("SELECT robot FROM robots WHERE robot LIKE '%%s%'",strtolower($user_agent));
爆炸成壮观的火球,
PS对不起这个相当基本的问题。这些天我正在减少我的咖啡。
文字%被指定为%%,所以你想要"... LIKE '%%%s%%'"
%
%%
"... LIKE '%%%s%%'"