Where id = parametre şeklinde olmalı. Php bilgim yok ancak sql sorgusu bariz hatalı.