USE THE LAST PHP VERSION, Hello, how are you! I have a question! ... how do I get certain values from one table, to put it in another? ... example: I have a table products in this table I have ... "ID", "product", "description" and "value of the product "and already has several products registered in that data filled
the other table is called inventory ... this table has only "ID", "Product", "Quantity" and "sum of value" in sum of value if the product is worth $ 5 dollars and I have 2 products then in quantity leaves "2" and in sum of values are added how much it costs in this case will be "$ 10" dollars .... and this table I have to show in a
How can I do this? Please! thanks!
and another small question ... how do I get how many rows do I have in a table (only the number of rows) and I show it in a html
tag, I'm trying this to see if a number comes out but no, I do not know how is done, I just want that echo
to show me the number of records let's say an 8 and already
$statement = $conexion->prepare("SELECT count(*) FROM carrito");
$statement->execute();
$resultado = $statement->fetchAll();
echo $resultado;