La query è corretta mentre il foreach non stampa nulla...