#47 NULL values inserted

2.3.2
closed-wont-fix
Jakub Vrána
Common (150)
5
2010-04-23
2010-04-23
Ondřej Brejla
No

When I have some attributes in the table marked as NULL (that they can be) and I try to fill the table using Adminer, these attributes are always filled by NULL values. Even though I filled inputs with my values. What I have to do is to manually switch NULL option in the select box next to the input field. That's quite WTF behavior. I noticed that I have NULLs in my table after minutes of app debugging:) Maybe the solution could be to have an empty option as a default value, not NULL option. Thx.

Discussion

  • Jakub Vrána
    Jakub Vrána
    2010-04-23

    Please specify your browser. Adminer changes NULL to the filled value in onchange. If you have disabled JavaScript then NULL has to be changed by hand.

     
  • Jakub Vrána
    Jakub Vrána
    2010-04-23

    • status: open --> pending
     
  • Ondřej Brejla
    Ondřej Brejla
    2010-04-23

    Ouou...my fault...sorry...disabled JS after some testing... "But" maybe it will be better to have empty like default, not NULL(in non-js version?). It's strange getting NULL values after you fill inputs..."because you didn't changed little select box"...I supposed that I get my inserted values...not NULL :) Or it's only my feeling.

     
  • Ondřej Brejla
    Ondřej Brejla
    2010-04-23

    • status: pending --> open
     
  • Jakub Vrána
    Jakub Vrána
    2010-04-23

    Default value should correspond with real default which is a NULL.

    Without JavaScript, it's impossible to know whether the NULL was selected earlier then filling the value or later.

     
  • Jakub Vrána
    Jakub Vrána
    2010-04-23

    • status: open --> closed-wont-fix
     
  • Ondřej Brejla
    Ondřej Brejla
    2010-04-23

    Yes I understand...but on the server side you can make decision (suppose NULL option is by default - like now) - if a user inserted some values in the field, you shouldn't insert NULL value (even though NULL option is selected by default)...if he didn't fill any value into the field and NULL is selected, so you can insert NULL value. I can't imagine a situation where someone fills some values and expects that NULL will be inserted. But it's only food for thought :-) And maybe there's some misunderstanding of Adminer philosophy on my side ;-) Thx for your time.

     
  • Jakub Vrána
    Jakub Vrána
    2010-04-23

    The opposite scenario is also possible. Something is filled in and user decides to change it to NULL. He would have no glue the apart from selecting NULL he has also need to clear the value.

     
  • Ondřej Brejla
    Ondřej Brejla
    2010-04-23

    That's true, but I think that the first case is more frequent so it can improve Adminer's usability. But I know, it can be the subject of discussions...