Home » Php » mysqli query does not return anything

mysqli query does not return anything

Posted by: admin October 29, 2018 Leave a comment


I am quite new to this as seen by the actual simplicity of my problem, however I really can not get this to work and I do not understand why.

$res = $link->query("SELECT `Namn`, `Efternamn` FROM `Elever` WHERE `ID` IN (SELECT `Användar ID` FROM `Elevgrupper` WHERE `Grupp ID` = 25)");

echo "error";


echo $res;

echo "<br><b>".$q."</b><br>\n";
    echo "result är true <br>";

if($res == false){
    echo "de blev fel där hörru";

And yes, I am 100% sure that I have properly connected to the correct database since other parts of the site work that also uses the database for values.