select * from 表名(你的上面的表的名字) where pid=id;
SELECT id, s.p_id, content,create_time,is_replayFROM `table` uLEFT JOIN (SELECT pid AS p_idFROM table)s ON 1 =1WHERE id = s.p_id用这种虚拟表的关联查询就好了