Welcome Guest, Not a member yet? Register   Sign In
Need Help Wih SELECT SUM()
#4

[eluser]Jay Logan[/eluser]
OK, I can get it to work with some good, old fashion PHP.

Code:
function get_team_points($id, $teamname){
        $sql = mysql_query("SELECT SUM(teampoints) AS points FROM ievents WHERE meet_id = '207' AND teamname = 'Ben Lippen HS'");
        $row = mysql_fetch_assoc($sql);
        return $row['points'];
    }

The problem with this is that I can't pass the variables $id and $teamname from the controller. Is there a CI version of the above code?


Messages In This Thread
Need Help Wih SELECT SUM() - by El Forum - 09-28-2008, 08:43 AM
Need Help Wih SELECT SUM() - by El Forum - 09-28-2008, 11:16 AM
Need Help Wih SELECT SUM() - by El Forum - 09-28-2008, 12:06 PM
Need Help Wih SELECT SUM() - by El Forum - 09-28-2008, 05:47 PM
Need Help Wih SELECT SUM() - by El Forum - 09-28-2008, 07:22 PM
Need Help Wih SELECT SUM() - by El Forum - 09-28-2008, 08:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB