I'm having an issue trying to bind my result. PHP keeps outputting an error with the following
Warning: mysqli_stmt::bind_result(): Number of bind variables doesn't match number of fields in prepared statement in /var/www/public_html/test.php on line 38
Now before anyone starts referencing other links, I have already looked up and down stackoverflow and done a little searching on Google as well. All the examples I've found, including PHP.net, say this is correct... But evidently it's not.
Here is what I have:
function __verify($digit4, $woid) {
$query = $this->mysql->prepare("SELECT * FROM pc_wo wo LEFT JOIN pc_owner owner ON owner.pcid=wo.pcid WHERE wo.woid=? AND SUBSTRING(owner.pcphone, -4)=?");
$query->bind_param("is",$woid,$digit4);
if ( !$query->execute() ) return false;
$query->bind_result($resp);
$query->fetch();
var_dump($resp);
return true;
}
EDIT I suppose you can't use bind_result for a wildcard select (*)... So what do I use in accordance with mysqli_stmt to fetch an entire array?
Thank you!