I have two tables: users: id username clan clans: id clan crest
I trying to do the search by username with output the clan of username.
Query:
SELECT `users`.`id`, `users`.`username`,`users`.`clan`, `clans`.`crest` FROM `users` JOIN `clans` ON `users`.`username` LIKE '%gu%' Output:
id username clan crest 2 gusar 26_760.gif 3 gusar11 Tong 26_760.gif If clan is empty crest will be empty.. But ... (
I want following result:
id username clan crest 2 gusar 3 gusar11 Tong 26_760.gif