Cast field data when ATTR_EMULATE_PREPARES is enabled

This commit is contained in:
Michael 2020-11-27 11:24:31 +00:00
parent f0d6f8c45e
commit bd9f36622e
6 changed files with 102 additions and 9 deletions

View file

@ -776,6 +776,18 @@ class DBA
return DI::dba()->toArray($stmt, $do_close);
}
/**
* Cast field types according to the table definition
*
* @param string $table
* @param array $fields
* @return array casted fields
*/
public static function castFields(string $table, array $fields)
{
return DI::dba()->castFields($table, $fields);
}
/**
* Returns the error number of the last query
*