Currently phpMyAdmin is set up to place the word "NULL" in any nullable fields by default, and I don't like that.
LOL! NO NO NO!
phpMyAdmin is simply *DETECTING* that the field is null and is REPORTING THAT TO YOU using the word NULL.
Trust me, if phpMyAdmin was putting "NULL" into a nullable field, MySQL would barf on its feet for any field that wasn't CHAR(4) or VARCHAR(4) or larger!
How in the world do you think a field declared ad quantity INT NULL could *possibly* contain the *STRING* 'NULL'?? Answer: It sure as heck can't.
You can easily prove this to yourself by, for example, doing your own SQL query (say in PHP) and then displaying the value of some null field. It will *NOT* be the string NULL.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
It's true that, with phpMyAdmin, there would be no way to tell the difference in the display of a NULL field and the display of a (say) varchar(8) field that contains the text string 'NULL', but I'm sure that the creator of phpMyAdmin figured (rightly so) that there's pretty darned close to a zero chance that anybody would actually store 'NULL' in a field's value. (Though they maybe reckoned without considering amateurs who don't know the difference.)
Personally, when I display NULL in a table dump, I do so using a different text color than I use for normal text, which then makes it clear.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
phpMyAdmin is simply *DETECTING* that the field is null and is REPORTING THAT TO YOU using the word NULL.
Trust me, if phpMyAdmin was putting "NULL" into a nullable field, MySQL would barf on its feet for any field that wasn't CHAR(4) or VARCHAR(4) or larger!
Oh...
Quote:
How in the world do you think a field declared ad quantity INT NULL could *possibly* contain the *STRING* 'NULL'?? Answer: It sure as heck can't.
I guess I never noticed that before. (Good point!)
Quote:
You can easily prove this to yourself by, for example, doing your own SQL query (say in PHP) and then displaying the value of some null field. It will *NOT* be the string NULL.
Okay.
Debbie
Last edited by doubledee; 06-10-2013 at 01:04 AM..
It's true that, with phpMyAdmin, there would be no way to tell the difference in the display of a NULL field and the display of a (say) varchar(8) field that contains the text string 'NULL', but I'm sure that the creator of phpMyAdmin figured (rightly so) that there's pretty darned close to a zero chance that anybody would actually store 'NULL' in a field's value. (Though they maybe reckoned without considering amateurs who don't know the difference.)
Now that I know what is going on, actually, the way you can tell that a Null is a Null is that phpMyAdmin shows the "placeholder" as an italicized value like this...
NULL
I guess it is still sorta annoying to me, since I have a few tables which contain - by design - a fair amount of Null's, and I'd really rather not see NULL in every instance...
You had to take the time to install and learn phpMyAddmin, so why not Workbench. It's very easy and quick to install and the learning curve is almost nill.
However, you do have another tool already installed and that would be the Mysql CLI.
You had to take the time to install and learn phpMyAddmin, so why not Workbench. It's very easy and quick to install and the learning curve is almost nill.
However, you do have another tool already installed and that would be the Mysql CLI.
Well, I use MAMP currently, so "No", there really wasn't any learning curve for me with phpMyAdmin.
But once I get my website up - God knows when that will happen - I would be interested in migrating to something that at least some other people say is more "mature"...
In the meantime, phpMyAdmin has been more than sufficient for my basic needs.
However, you do have another tool already installed and that would be the Mysql CLI.
Well, true. But the command line interface reports null fields with the NULL keyword, as well, and doesn't even use some color or styling to distinguish between the keyword and a string of the same value. So it would still have been just as confusing.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.