"SELECT DISTINCT `Name` FROM ( SELECT * FROM `Aliases` WHERE ( `IP` GLOB 'ENTERED_NAME' ) ORDER BY `Datetime` DESC )"
Basically trying to get all the names that link to the same IP address as the "ENTERED_NAME".
Is there a MySQL equivalent to "GLOB" ?
GLOB uses wildcards, eg GLOB 'Foo*' to match anything starting with Foo. Mysql doesn't support this, but you can convert your string to work with LIKE as follows:
WHERE IP LIKE BINARY REPLACE('ENTERED_NAME', '*', '%') -- replace * with %
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With