0
I’m trying to sum all the values at once from the table, but it’s giving error, my code: mysqli_query($conexao,"SELECT SUM(entrada) FROM livro");
I believe that it is because the values are comma (ex: 1,10), does anyone have any hint of what to do? Table: book, column: input.
And how’s the comma in the database? You stored a numeric value in a text column?
– Woss
I put the value on
varchar
– João Victor
Then, if possible, already refactoring the bank and store in a numerical column so that these problems do not happen.
– Woss
Since it has commas I put in decimal, but it still returns me this: "Recoverable fatal error. Object of class mysqli_result could not be converted to string in C: xampp htdocs Apps book index.php" on line 2
– João Victor