I am getting this error (Call to a member function bind_param() on a non-object ) for my prepared statement as below which I know means that there is some error in the sql statement but I cannot see any error at all. I have been staring at this for a while now and I cannot see the error, I also tried to echo the sql statement and it seemed to be good. Could someone please tell me where I have gone wrong here?
$sql2 =
"INSERT INTO $this->table_1 ($this->key_1, $this->key_2, $this->key_3, $this->key_4, $this->key_5)
VALUES (?, ?, ?, ?, ?);";
$stmt2 = $this->connection->prepare($sql2);
$stmt2->bind_param("isssi", $1, $2, $3, $4, $5);
$stmt2->execute();
$stmt2->close();
Thanks