29.05.2013, 08:09
(
Последний раз редактировалось Pottus; 29.05.2013 в 08:56.
)
Alright, well I'm trying to get some wildcard searching in my DB for looking up banned user names and IP's I've referred to this tutorial here https://sampforum.blast.hk/showthread.php?tid=262417
Specially this line here demonstrates how to do a wildcard search
" delete from `players` where `playerName` = 'Henry%' "
So here is what I have
Output:
DELETE FROM `BannedUsers` Where `PlayerName` = 'test%'
Plasenote this will work when the wildcard is removed and the whole name is supplied
DELETE FROM `BannedUsers` Where `PlayerName` = 'testname'
I don't seem to be getting any query results when trying to use a wildcard in the search anyone have any ideas here or is this a SAMP limitation with SQLite?
Specially this line here demonstrates how to do a wildcard search
" delete from `players` where `playerName` = 'Henry%' "
So here is what I have
pawn Код:
format(Query, sizeof(Query), "DELETE FROM `BannedUsers` Where `PlayerName` = '%s%c'", DB_Escape(text), 37);
printf("%s", Query);
Result = db_query(BannedUsers, Query);
DELETE FROM `BannedUsers` Where `PlayerName` = 'test%'
Plasenote this will work when the wildcard is removed and the whole name is supplied
DELETE FROM `BannedUsers` Where `PlayerName` = 'testname'
I don't seem to be getting any query results when trying to use a wildcard in the search anyone have any ideas here or is this a SAMP limitation with SQLite?