There was an SQL error: Unknown column 'pp_' in 'on clause' - SELECT * FROM `pp_katalog_wpisy` JOIN `pp_katalog_wpisy_addons` ON (`id` = `pp_`) WHERE `client_id` = '510' AND `important` = 1