Why is this not working:
function listOrderComments ($factnr){
global $connection;
//$factnr = 123; //or $factnr = "123"; (Both work)
$query = "SELECT * FROM orderstatus WHERE factuurnummer = '$factnr'";
$result = mysqli_query($connection, $query);
When I echo $factnr
I get "123" back.
When I uncommented //$factnr = 123;
my function is working.
Looked everywhere for a solution. check the type $factnr
is (string).