Returns no results?

I want to see all the PC´s(maskine) used by class(klasse) 1A, with the users(bruger) names. For some reason I get no results using this code. A similar code works just fine, to find out which students use a PC (PC name is only a number). Is it different when the search contains letters?

Input fra form, Klasse: “1A”


$_SESSION[“klasseID”] = $_POST[“searchKlasseID”];

Klasse: <?php echo $_SESSION["klasseID"]; ?>

(This works) <?php $query = "SELECT * FROM BrugerT JOIN MaskineT ON MaskineT.Bruger1=BrugerT.Unilogin WHERE BrugerT.BrugerKlasse LIKE '{$searchterm}'"; ?>

so how should anyone reproduce that without according data? just use

Sorry, found the fault in the database.

This isn’t a like, it has no wildcards.

Sponsor our Newsletter | Privacy Policy | Terms of Service