0 in a integer field is shown as /NULL/

Issue #98 resolved
Former user created an issue

Originally reported on Google Code with ID 98 ``` What steps will reproduce the problem? 1. have a table with a integert colum 2. insert integer 0 3. browes table

What is the expected output? What do you see instead? to see '0' but I see NULL (in italic)

What version of the product are you using? On what operating system? v1.9.1, linux, arm

```

Reported by `m.gysel` on 2012-04-04 15:11:12

Comments (4)

  1. Former user Account Deleted

    ``` Yes, thereis a bug here.

    Natively sqlite differs NULL from '' (empty) value for the strings. We can surely see that in command line sqlite3 tool:

    sqlite>.nullvalue NULLES; make it to output 'NULLES' word whenever NULL value is encountered.

    sqlite> select * from categories limit 2; 1|Бизнес аксессуары|1|NULLES; 2|Бумага офисная|2|NULLES;

    so we can see two strings with NULL values in 4th column. let's change it to '' (empty) value in 1st string :

    sqlite> update categories set type='' where id=1;

    and see what happened:

    sqlite> select * from categories limit 2; 1|Бизнес аксессуары|1| 2|Бумага офисная|2|NULLES;

    there is empty value in 1st string in 4th column now.

    But both cases (empty and NULL values) shows like NULL in phpliteadmin 1.9.1. ```

    Reported by `master@remort.net` on 2012-04-09 11:45:08

  2. Former user Account Deleted

    ``` The same with text columns. If I save empty string (with unchecked NULL checkbox), the value is saved as NULL. So, it is impossible to save empty string. ```

    Reported by `vadicos` on 2012-04-26 13:05:37

  3. Former user Account Deleted

    ``` Actually, values like NULL and empty string are saved correctly, but error is when showing data. Strict comparsion (===) with NULL should be used in two places: - view data table (line 3047) - data editing form (line 3387) (v.1.9.1) ```

    Reported by `vadicos` on 2012-04-27 08:10:25

  4. Dane Iracleous

    ``` Fixed in v1.9.3 ```

    Reported by `diracleo` on 2012-06-02 08:03:50 - Status changed: `Fixed`

  5. Log in to comment