I have this code that works on my localhost but not on godaddy server
$sql = 'SELECT hash FROM user_for_activation where registeredDate = ?;';
$stmt = mysqli_stmt_init($conn);
if(!mysqli_stmt_prepare($stmt,$sql)){
echo "SQL Connection Failed";
}
else{
mysqli_stmt_bind_param($stmt,"s",$dateRegistered);
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
while($row = mysqli_fetch_assoc($result)){
$hash = $row['hash'];
}
}
I am getting an error on line mysqli_fetch_assoc($result)
but this works on my localhost. Is this a compatibility issue?