How can I record all data in a table together?
i have values in individual rows that i wish to add up to one. and get the value into a variable.
what can i use instead of this code below to get all id in the table instead of one?
if(isset($_GET['ide'])){
$coode = $_GET['ide'];
so that once i get all id, i can do the query below...
$products = $db->query("SELECT e1,e2 FROM eyfstb WHERE specialnum='$coode'");
while($row = $products->fetch_assoc()){
$e1view = $row["e1"]; $e2view = $row["e2"];
}
and once the query is done, i want to be able to store them in a variable like below
$final = (e1,e2 of id1) + (e1,e2 of id2) + (e1,e2 of id3) + (e1,e2 of id4);
fine is 5 good is 4 fair is 3 my e1 is fine which is equal 5 my e2 is good which is equal 4
making 9 when i added it. but i want to get for all record rows in the table
currently i'm able to get the details for only one student from the url $coode but i want to get for all the student from a table and be able to add the resulting data.
Table Structure
id | e1 | e2 |
---------------------------
1 | fine | good |
2 | good | good |
3 | fair | fine |