I want to run a function if the returned data from database matches a specific value.
For example, if SELECT city FROM users ORDER BY id DESC LIMIT 1
returns "London" then run the PHP function 'myFunction()'.
What I tried is :
// Database connected successfully
$abc = "SELECT city FROM users ORDER BY id DESC LIMIT 1";
if ($abc = "London") {
myFunction();
}
else{
echo("not found");
}