Jump to content

When to use the 'null' option


Rogue3

Recommended Posts

I have a field in my form (varchar(80)) that I don't always enter information for. It's an "additional keyword" field used to put additional keywords for my search form. Right now I have it to where it is just blank, but should I have it set to 'null' if there is no info there? Will this affect the search one way or the other?
Link to comment
https://forums.phpfreaks.com/topic/13841-when-to-use-the-null-option/
Share on other sites

it won't affect the search, really, but it may help in your queries to have it NULL as opposed to an empty string. they [b]are not[/b] the same thing. an empty string still has memory allocated to store it, while a NULL is a truly empty value. setting your table to default NULL is usually a good idea.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.