ontarget
Active Member
I have a calc element returning
The var_dump returns a valid string however on form submission i get the error:
However then calc doesn't output anything because there is no match!
Any ideas on how to fix this please?
PHP:
$iban = '{aaa_my_profile___iban}';
//split array into chunks of 4 chars
$iban = str_split($iban,4);
//print_r($iban);
$iban = $iban[1];
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery = "SELECT `bic` FROM `aaa_bic` WHERE `bic` LIKE '%$iban%'";
$myDb->setQuery($myQuery);
$bic = $myDb->loadResult();
//var_dump($bic);
//exit;
return $bic;
I think it's something to do with the LIKE '%$iban%'"; because when i remove the wildcard % the form submits fine.0
Argument number specifier must be greater than zero and less than 2147483647
However then calc doesn't output anything because there is no match!
Any ideas on how to fix this please?