I have some code which I don’t fully understand how it is working. It achieves the desired result but I keep getting warnings: `mysqli_stmt_bind_param() expects parameter 2 to be a string
I think the line `mysqli_stmt_bind_param( $stmt, $bind_params );
“`
if ( $stmt = mysqli_prepare($this->mysqli, $query) ) :
$customer_id = $this->customer[“id”];
$invoice_no = $dataArrayRow[‘Invoice No’];
$sale_type_desc = $dataArrayRow[‘Sale Type Desc’];
$file_date = $this->fileGeneratedDate->format(‘Y-m-d H:i:s’);
$bind_params = array(‘isss’, &$customer_id, &$invoice_no, &$sale_type_desc, &$file_date);
call_user_func_array( array($stmt, ‘bind_param’), $bind_params);
mysqli_stmt_bind_param( $stmt, $bind_params );
// Execute the statement
if ( !mysqli_stmt_execute( $stmt ) ) :
…
endif;
endif;