function coder_upgrade_count_sql_values in Coder 7
Same name and namespace in other branches
- 7.2 coder_upgrade/conversions/db.inc \coder_upgrade_count_sql_values()
Returns count of sql values that need a replacement value.
Parameters
array values: Array of sql values.
Return value
integer Count of values.
1 call to coder_upgrade_count_sql_values()
- coder_upgrade_parse_insert_query_string in coder_upgrade/
conversions/ db.inc - Replaces D6 database API call with D7 equivalent.
File
- coder_upgrade/
conversions/ db.inc, line 626 - Provides conversion routines applied to database API function calls and hooks.
Code
function coder_upgrade_count_sql_values($values) {
$count = 0;
foreach ($values as $value) {
if (preg_match('/%[sdbf]/', $value)) {
// Value is a placeholder.
$count++;
}
}
return $count;
}