MySQL: Difference between revisions

14 bytes removed ,  05:22, 4 October 2015
no edit summary
imported>LiamLime
No edit summary
imported>LiamLime
No edit summary
Line 81: Line 81:
SELECT *<br>
SELECT *<br>
FROM ss13_player<br>
FROM ss13_player<br>
WHERE ckey LIKE "%rro%"
WHERE ckey LIKE "%abc%"


This will return a list of players, whose ckey contains the letters 'err'. The % signs before and after rro mean that anything can be located before or after rro. LIKE also ignores case, so all of the following will work: "e'''rro'''", "'''rro'''n", "aocwegijaw'''rro'''maobr", "'''rro'''", "'''RRO'''", "'''RrO'''", "E'''Rro'''", "aWAEGaewgaWEG'''rRo'''aegawe". Your example might require you to replace the string rro with a different character combination, depending on which ckeys you have logged.
This will return a list of players, whose ckey contains the letters 'err'. The % signs before and after abc mean that anything can be located before or after abc. LIKE also ignores case, so all of the following will work: "'''abc'''n", "aocwegijaw'''abc'''maobr", "'''abc'''", "'''ABC'''", "'''AbC'''", "E'''Abc'''", "aWAEGaewgaWEG'''aBc'''aegawe". Your example might require you to replace the string abc with a different character combination, depending on which ckeys you have logged.


==== Numbers ====
==== Numbers ====
Anonymous user