Invalid query: Table 'fantogame.storie_complete' doesn't exist Whole query: SELECT DISTINCT j.id as id FROM storie_complete as j WHERE j.last <> all (SELECT up FROM storie_pezzi where verificato = 2) ORDER BY rand() Limit 0,1