Good way to get information when fatal error of bind-param With a couple of more lines of code you can get very detailed information which you can use to solve the issue immediately. Check the prepare() statement for truthiness and if it is good you can proceed on to binding and executing. if($query = $mysqli->prepare($sql)) { // assuming $mysqli is the connection $query->bind_param('s', $definition); $query->execute(); // any additional code you need would go here. } else { $error = $mysqli->errno . ' ' . $mysqli->error; echo $error; // 1054 Unknown column 'foo' in 'field list' } if($stmt = $dbLink->prepare($q)) { // assuming $mysqli is the connection if($rpt_type == 'Vendor'){ $stmt->bind_param('iiiiii', $recordId, $schoolYear, $thisVendor, $recordId, $schoolYear, $thisVendor); } else{ $stmt->bind_param('iiiii', $recordId, $recordId, $schoolYear, $recordId, $schoolYear); } $stmt->execute(); // any additional code you need would go here. } else { $error = $dbLink->errno . ' ' . $dbLink->error; echo $error; // 1054 Unknown column 'foo' in 'field list' }