I am trying to search domain names ending in particular keywords. e.g. "car" would bring up buycar.com, but not carbuy.com.
So if my query is
SELECT * FROM domains WHERE LIKE '%car'
Will not show any results at all, obviously because the domains dont end in car, they end in .com, or .co, or something.
I think I need to do some sort of regex replace to search the domain, until the first .
Or whatever would do the equivalent of this in sql for php:
$pos = strpos($domain,'.');
$search = substr($domain,0,$pos);
So it would just search the actual domain without the TLD. Is this possible with sql?
LIKE.