I updated the question code I am still having issues no errors but does not update the record. also need to figure how to write in record # updated successfully. I am stuck on t
This code is a disaster:
$affected_rows = $db->exec("UPDATE requests SET") .
^^---terminating your query here
"lanId = '" . $lanId . "', ".
So you run a malformed query (UPDATE requests SET
), which will either throw an exception of return boolean FALSE. You then concatenate a whole bunch of text (which would've been part of your query) onto that FALSE.
And even if this code was properly structured, you'd be WIDE OPEN to sql injection attacks.