In MySQL, I have a visitor_log table that looks like this…
FIELD NULL DEFAULT
------ ----- --------
id (UK) No
member_viewed_id (P1)(FK) No
visitor_id (P2)(FK) No 0
ip No
hostname No
created_on (P3) No
updated_on Yes
Based on some previous advice, I was told that is it okay to store a NULL in the “visitor_id” field when someone is a non-registered Visitor.
In phpMyAdmin, I changed the “visitor_id” field to Null = “Yes” and left Default blank, but when I save the table phpMyAdmin is not accepting these changes?!
What is wrong?
And how do I make it so I can INSERT a NULL into the “visitor_id” field when logging a Non-Member Visitor? :-/
Sincerely,
Debbie
P.S. Because I used to INSERT a “0” for Non-Member Visitors, my table has tons of records with visitor_id = 0. But that shouldn’t matter if I am just trying to make the field Nullable?!