-1
Well, I wanted to count +1 in mysql, and I’m not getting it.
Code below
<?php
$con=mysqli_connect("localhost","root","asdasd","dbb");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$valor = mysqli_query ($con, "SELECT * site_stats (item) VALUES");
$novoValor = $valor + 1;
mysqli_query($con,"SELECT * FROM site_stats");
mysqli_query($con,"INSERT INTO site_stats (item) VALUES ('$novoValor')");
mysqli_close($con);
?>
Use auto_increment
– William John Adam Trindade
I’m already wearing it, but for some reason it’s not climbing +1
– Misterium
Want to insert or update (update) a record?
– user60252
For example, the system I want to do is it has the 1 view and after that when someone view again increase +1
– Misterium