Simple query to insert record in table but for some reason I am getting this error
Cannot pass parameter 2 by reference in error.
I am not sure why. I tried almost 2 hours but not able to fix it.
$pid = '5';
$ip_add = '127.0.0.1';
$result = $mysqli->prepare("INSERT INTO profile_view(profile_id, ip_address) VALUES (?, ?)");
$result->bind_param("is", $pid, $ip_add);
$result->execute();
$result->store_result();
if($result){
echo 'Success';
}
Database design is as follows.
ID - BigInt - Auto Increment
profile_id - BigInt
Date - CURRENT_TIMESTAMP
ip_address - VARCHAR 100
Why would I get this error?