select all entries and sum the total php code example Example: sum mysql column SELECT sum( mark ) FROM `student`