$sql = "SELECT * FROM hits WHERE therefer != '' AND therefer LIKE '%dalehay.com%' ORDER BY therefer ASC";
Now above doesn't show any blank entries and it will only show entries with 'dalehay.com' in the database, however is there a way to hide them entries? And only search for non-dalehay.com addresses?
Slightly off-topic, and a bit of a personal annoyance more than anything else, but 'the' has no place in a column name. 'therefer' should be just 'refer' (or 'referer' if that's what it actually contains).