When I attempt to run my query, nothing happens (not NULL, just not printing a value). When I run my query against my database, the desired result is returned.
I am informed that the connection was successful when I execute my code. (I omitted my database variable information to safeguard the sensitive information, but it is accurate.)
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
echo "error";
}
else{
echo "conn successful";
}
$sql = "SELECT app_ref_person_submitted_by
FROM vacancy_applications
WHERE app_ref_vacancy = 306";
$result = $conn->query($sql);
echo $result;
$conn-> close();
Can someone please help me with this?