You can use the below code for getting the value num_rows
in an object with PHP. I implemented the code used in the above code for getting value in the object.
<?php
include("../functions/functions.php");
include("./db.php");
global $conn;
$ip = get_ip();
$select = "SELECT * FROM `cart` WHERE `ip_address`= '$ip' ";
$run_check_prod = mysqli_query($conn,$select);
if(mysqli_num_rows($run_check_prod) > 0) {
//the $run_check_prod is object and num_rows is key
echo $run_check_prod->num_rows;
}
?>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…