MySQL Forums
Forum List  »  PHP

Need to use a stored function in a prepared statement -- HOW?
Posted by: Don Ireland
Date: December 30, 2015 08:48PM

I'm trying to set up a prepared statement. But one of the fields needs set by a stored function. When I try the following, I get an error message "Fatal error: Call to a member function bind_param() on a non-object in ......".

$stmt = $conn->prepare("INSERT INTO `transactions` (`payee`,`date`,`memo`,`acctID`,`ref`,`hasChildren`,`userID` ,`rBalN` ) VALUES (?,?,?,?,?,?,?,getRunningBal($uID,$txn['acctID'],$txn['date']);");


How can I go about using the stored function to set the RBalN field?

Don

Options: ReplyQuote


Subject
Written By
Posted
Need to use a stored function in a prepared statement -- HOW?
December 30, 2015 08:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.