<?php public function sumZong($id){ $sql =' SELECT * FROM vvt_league_user AS p Left join vvt_league AS r ON p.league_id = r.id Left join vvt_league_invest_sum AS n ON r.id = n.league_id WHERE p.status = 1 AND r.status = 1 AND p.user_id ='. $id ; $res = $this ->query($sql); return $res; } ?>