Good evening, everyone. I have little programming experience. I apologize if I am not very clear on the question.
I have a MySQL database (phpmyadmin) with a table named "my_table" having one of the fields named "value". I need to add the "value" field of all table rows.
To count how much data worked, how much I used the following snippet:
$select = $pdo->query("SELECT * FROM minha_tabela")->fetchAll();
// atribuindo a quantidade de linhas retornadas
$count = count($select);
// imprimindo o resultado
print $count;
Now I need to do the sum and I do not know how to write the program. I am using PDO programming. Many thanks.