I have this line:
$stmt->bind_result('d', $keyarray['payment_gross']);
and I get this error:
Fatal error: Cannot pass parameter 1 by reference in /home/star1231/public_html/pdt.php on line 35
What is the problem here?
Not much I can tell about your code, but if parameter 1 is passed by reference in function definition then you need to do this.
$char = 'd';
$stmt->bind_result($char, $keyarray['payment_gross']);
Only variables can be passed by reference since you are passing the address of the variable and not an actual value. Let me know if it solves it
You should use parameter type ONLY when you bind_param
$stmt->bind_param('d',$some_double_var);
but
$stmt->bind_result($answer_variable);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With