1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 03:24:01 +02:00

Simplify work with NULL values in select

This commit is contained in:
Jakub Vrana
2012-05-13 23:24:39 -07:00
parent 20cf6d29c5
commit c4a57246ac
4 changed files with 11 additions and 10 deletions

View File

@@ -159,7 +159,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
}
function selectVal($val, $link, $field) {
$return = ($val == "<i>NULL</i>" ? "&nbsp;" : $val);
$return = ($val === null ? "&nbsp;" : $val);
if (ereg('blob|bytea', $field["type"]) && !is_utf8($val)) {
$return = lang('%d byte(s)', strlen($val));
if (ereg("^(GIF|\xFF\xD8\xFF|\x89PNG\x0D\x0A\x1A\x0A)", $val)) { // GIF|JPG|PNG, getimagetype() works with filename