swampone Posted March 1, 2011 Share Posted March 1, 2011 I need to be able to add all the numbers together collected from the database with mysql_fectch_array public function gradeQuery(){ $id = $this->idQuery(); $sql = "SELECT*FROM grades WHERE moviesID = '$id'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $num_rows = mysql_num_rows($result); } Link to comment https://forums.phpfreaks.com/topic/229221-add-all-numbers-in-mysql_fetch_arrary/ Share on other sites More sharing options...
swampone Posted March 1, 2011 Author Share Posted March 1, 2011 each $row['grade']; contains number. I believe I have to use a while loop somehow. Link to comment https://forums.phpfreaks.com/topic/229221-add-all-numbers-in-mysql_fetch_arrary/#findComment-1181102 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.