[SQLite] search ban help needed
#6

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Make sure you insert a literal %% to indicate a wildcard.
Quote:
Originally Posted by FUNExtreme
Посмотреть сообщение
Wildcards indeed.

SQL LIKE accepts wildcards, the one you want is '%', this tells the engine that there can be 0 or more missing letters there.
%string% will give you what you need.
Samp escapes the % sigh so you'll need to use %%
Код:
SELECT * FROM `BANNED` WHERE `NAME` LIKE '%%%s%%' OR `IP` LIKE '%s' ORDER BY `DATE` DESC LIMIT 6
Thanks, I guess I wasn't using enough %'s previously.
+rep'd everyone I could
EDIT: managed to +rep everyone
Reply


Messages In This Thread
[SQLite] search ban help needed - by Kyance - 28.08.2014, 06:06
Re: [SQLite] search ban help needed - by Jefff - 28.08.2014, 15:27
Re: [SQLite] search ban help needed - by Kyance - 28.08.2014, 15:43
Re: [SQLite] search ban help needed - by Pottus - 28.08.2014, 16:04
Re: [SQLite] search ban help needed - by FUNExtreme - 28.08.2014, 16:10
Re: [SQLite] search ban help needed - by Kyance - 28.08.2014, 17:05

Forum Jump:


Users browsing this thread: 1 Guest(s)