Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2011-09-18 15:06:30 +0400
committerMadhura Jayaratne <madhura.cj@gmail.com>2011-09-18 15:06:30 +0400
commite71182b724bfb111085007b8a77b70ff02db623c (patch)
tree102e866e3b7af257a147c4f5d5f139e712d93bf2 /tbl_zoom_select.php
parent5cd8af78c3fc587c6d1343bc47d938118f57051a (diff)
Convert bit values to printable form
Diffstat (limited to 'tbl_zoom_select.php')
-rw-r--r--tbl_zoom_select.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tbl_zoom_select.php b/tbl_zoom_select.php
index 548b03f4f8..7fabd2f4ed 100644
--- a/tbl_zoom_select.php
+++ b/tbl_zoom_select.php
@@ -42,6 +42,14 @@ if (isset($_REQUEST['get_data_row']) && $_REQUEST['get_data_row'] == true) {
$result = PMA_DBI_query($row_info_query . ";", null, PMA_DBI_QUERY_STORE);
$fields_meta = PMA_DBI_get_fields_meta($result);
while ($row = PMA_DBI_fetch_assoc($result)) {
+ // for bit fields we need to convert them to printable form
+ $i = 0;
+ foreach ($row as $col => $val) {
+ if ($fields_meta[$i]->type == 'bit') {
+ $row[$col] = PMA_printable_bit_value($val, $fields_meta[$i]->length);
+ }
+ $i++;
+ }
$extra_data['row_info'] = $row;
}
PMA_ajaxResponse(null, true, $extra_data);