0

I'm getting a very confusing/difficult to figure out syntax error on the following block of code:

$query = "SELECT COUNT(*) AS BillCount FROM firms WHERE firm_fk  = ?";
        
$stmt = $this->conn->prepare($query);
$stmt->bindParam(1, $this->id);

$stmt->execute();
$billcount = $stmt->fetchColumn();

The error is in regards to the final line:

$billcount = $stmt->fetchColumn();

And the actual error message is: syntax error, unexpected '$stmt' (T_VARIABLE)

Any ideas? This is driving me crazy!

FastTrack
  • 8,810
  • 14
  • 57
  • 78

0 Answers0