When using Mysqli without ZF you need to tell bind_param what the data types are of the parameters you are binding, e.g.
PHP Code:
$stmt = $mysqli->prepare("INSERT INTO CountryLanguage VALUES (?, ?, ?, ?)");
$stmt->bind_param('sssd', $code, $language, $official, $percent);
When I looked for this in the ZF I couldn't find a way to tell it what the data types are. From the code I found it looks like the ZF just labels all parameters as string, 's'.
Zend_Db_Statement_Mysqli, line 172
PHP Code:
// send $params as input parameters to the statement
if ($params) {
array_unshift($params, str_repeat('s', count($params)));
call_user_func_array(
array($this->_stmt, 'bind_param'),
$params
);
}
Am I missing something or could this cause problems, for instance sending integers when the MySQL server is expecting a string?