From d9d92dda4670da467c718d6307031894ac9a4ca9 Mon Sep 17 00:00:00 2001 From: Chanaka Indrajith Date: Fri, 3 Aug 2012 00:35:09 +0530 Subject: [PATCH] Image link display transformed data in sql query results --- libraries/CommonFunctions.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/CommonFunctions.class.php b/libraries/CommonFunctions.class.php index de5a172d42..6ffa509590 100644 --- a/libraries/CommonFunctions.class.php +++ b/libraries/CommonFunctions.class.php @@ -2302,7 +2302,9 @@ class PMA_CommonFunctions $con_key = $this->backquote($meta->table) . '.' . $this->backquote($meta->orgname); } // end if... else... - $condition = ' ' . $con_key . ' '; + $condition = ($fields_cnt == 1) + ? ' CHAR_LENGTH(' . $con_key . ') ' + : ' ' . $con_key . ' '; if (! isset($row[$i]) || is_null($row[$i])) { $con_val = 'IS NULL'; @@ -2330,7 +2332,9 @@ class PMA_CommonFunctions $con_val = '= CAST(0x' . bin2hex($row[$i]) . ' AS BINARY)'; } else { // this blob won't be part of the final condition - $con_val = null; + $con_val = ($fields_cnt == 1) + ? ' = '. strlen($row[$i]) + : null; } } elseif (in_array($meta->type, $this->getGISDatatypes())