Support 'character varying'

This commit is contained in:
Jakub Vrana 2010-11-01 16:10:17 +01:00
parent dca7c51bd3
commit c64557aaf5

View file

@ -166,7 +166,7 @@ document.getElementById('username').focus();
* @return string
*/
function selectVal($val, $link, $field) {
$return = ($val != "<i>NULL</i>" && ereg("^char|binary", $field["type"]) ? "<code>$val</code>" : $val);
$return = ($val != "<i>NULL</i>" && ereg("char|binary", $field["type"]) && !ereg("var", $field["type"]) ? "<code>$val</code>" : $val);
if (ereg('blob|bytea|raw|file', $field["type"]) && !is_utf8($val)) {
$return = lang('%d byte(s)', strlen(html_entity_decode($val, ENT_QUOTES)));
}