Can a foreign key have a NULL value. Also PMA making corrupted MySQL

Newb question. I want to allow messages to be assigned an overall group or no group at all. If a group IS assigned it must be on the list of existing groups. Cannot see this in PHPmyAdmin… Sure I saw something like it once cannot find it again.

Also I added an experimental column to a table then deleted it but for ages PMA kept on giving me errors relating to the non existent field. Makes me a bit nervous… Any thoughts on how I can confirm the authenticity of what I see in PMA?

Sorry to ask two questions at once but getting embarrassed about the number of dumb questions I am asking.



you’re thinking of a foreign key, and yes, it can be NULL

go to the SQL window/tab, and submit the following query:

SHOW CREATE TABLE [I]tablename[/I]

this gives you the exact structure of the table without phpmyadmin’s obnoxious interface

if you can, consider using heidisql instead (it’s a desktop app)

I was asking how to set a FK to allow NULL in PMA

LOL you obviously LOVE PMA! I have deleted the table just worried me that this error happened in the first place!

I have downloaded Heidi and am giving it a look!

Bit of a learning curve but already found a few useful bits already. Thanks for the steer.

And once gain thanks again for all your kind help to many of us here - especially us dumb newbs. You are very tolerant