eriche
Member
Hello,
After many hours trying to figure out on my own how to call a procedure with parameters from an extended Xenforo PHP class - I have to ask you guys for help
Calling a procedure without parameters or with hardcoded parameters works fine!
But how to call the procedure with the bindParam command
I also tryed the syntax for the parameter like
But it always fails
So please tell me whats the correct syntax to call the procedure with bindParam from Xenforo with the default db-Adapter.
thX Erich
After many hours trying to figure out on my own how to call a procedure with parameters from an extended Xenforo PHP class - I have to ask you guys for help
Calling a procedure without parameters or with hardcoded parameters works fine!
Code:
$stmt = $db->prepare('CALL my_procedure_test(2)');
$stmt->execute();
$rows = $stmt->fetchAll();
But how to call the procedure with the bindParam command
PHP:
$stmt = $db->prepare('CALL my_procedure_test(?)');
$stmt->bindParam(1, 5);
$stmt->execute();
$rows = $stmt->fetchAll();
I also tryed the syntax for the parameter like
Code:
:param1 instead of "?"
So please tell me whats the correct syntax to call the procedure with bindParam from Xenforo with the default db-Adapter.
thX Erich