本文整理汇总了PHP中PMA_getCurrentValueAsAnArrayForMultipleEdit函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getCurrentValueAsAnArrayForMultipleEdit函数的具体用法?PHP PMA_getCurrentValueAsAnArrayForMultipleEdit怎么用?PHP PMA_getCurrentValueAsAnArrayForMultipleEdit使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_getCurrentValueAsAnArrayForMultipleEdit函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
// check if transformation was successful or not
// and accordingly set error messages & insert_fail
if (method_exists($transformation_plugin, 'isSuccess') && !$transformation_plugin->isSuccess()) {
$insert_fail = true;
$row_skipped = true;
$insert_errors[] = sprintf(__('Row: %1$s, Column: %2$s, Error: %3$s'), $rownumber, $column_name, $transformation_plugin->getError());
}
}
}
if ($file_to_insert->isError()) {
$message .= $file_to_insert->getError();
}
// delete $file_to_insert temporary variable
$file_to_insert->cleanUp();
$current_value = PMA_getCurrentValueForDifferentTypes($possibly_uploaded_val, $key, $multi_edit_columns_type, $current_value, $multi_edit_auto_increment, $rownumber, $multi_edit_columns_name, $multi_edit_columns_null, $multi_edit_columns_null_prev, $is_insert, $using_key, $where_clause, $table);
$current_value_as_an_array = PMA_getCurrentValueAsAnArrayForMultipleEdit($multi_edit_funcs, $multi_edit_salt, $gis_from_text_functions, $current_value, $gis_from_wkb_functions, $func_optional_param, $func_no_param, $key);
list($query_values, $query_fields) = PMA_getQueryValuesForInsertAndUpdateInMultipleEdit($multi_edit_columns_name, $multi_edit_columns_null, $current_value, $multi_edit_columns_prev, $multi_edit_funcs, $is_insert, $query_values, $query_fields, $current_value_as_an_array, $value_sets, $key, $multi_edit_columns_null_prev);
if (isset($multi_edit_columns_null[$key])) {
$multi_edit_columns[$key] = null;
}
}
//end of foreach
// temporarily store rows not inserted
// so that they can be populated again.
if ($insert_fail) {
$unsaved_values[$rownumber] = $multi_edit_columns;
}
if (!$insert_fail && count($query_values) > 0) {
if ($is_insert) {
$value_sets[] = implode(', ', $query_values);
} else {
示例2: testGetCurrentValueAsAnArrayForMultipleEdit
/**
* Test for PMA_getCurrentValueAsAnArrayForMultipleEdit
*
* @return void
*/
public function testGetCurrentValueAsAnArrayForMultipleEdit()
{
$multi_edit_funcs = array(null);
$result = PMA_getCurrentValueAsAnArrayForMultipleEdit(null, null, $multi_edit_funcs, null, null, 'currVal', null, null, null, 0);
$this->assertEquals('currVal', $result);
// case 2
$multi_edit_funcs = array('UUID');
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
$dbi->expects($this->once())->method('fetchValue')->with('SELECT UUID()')->will($this->returnValue('uuid1234'));
$GLOBALS['dbi'] = $dbi;
$result = PMA_getCurrentValueAsAnArrayForMultipleEdit(null, null, $multi_edit_funcs, null, null, 'currVal', null, null, null, 0);
$this->assertEquals("'uuid1234'", $result);
// case 3
$multi_edit_funcs = array('AES_ENCRYPT');
$multi_edit_salt = array("");
$result = PMA_getCurrentValueAsAnArrayForMultipleEdit(null, null, $multi_edit_funcs, $multi_edit_salt, array(), "'''", array(), array('func'), array('func'), 0);
$this->assertEquals("AES_ENCRYPT(''','')", $result);
// case 4
$multi_edit_funcs = array('func');
$multi_edit_salt = array();
$result = PMA_getCurrentValueAsAnArrayForMultipleEdit(null, null, $multi_edit_funcs, $multi_edit_salt, array(), "'''", array(), array('func'), array('func'), 0);
$this->assertEquals("func(''')", $result);
// case 5
$result = PMA_getCurrentValueAsAnArrayForMultipleEdit(null, null, $multi_edit_funcs, $multi_edit_salt, array(), "''", array(), array('func'), array('func'), 0);
$this->assertEquals("func()", $result);
}