Connecting Tech Pros Worldwide Forums | Help | Site Map

Unique Field

Newbie
 
Join Date: Jul 2008
Posts: 2
#1: Jul 4 '08
I am installing a portal (php-nuke), that has a url unique field in addlink, ie no two url entries can be the same ... it also will not accept a null field (well it will but once only) ... i need to be able to create listings with addlink for subscribers who do not have a url ... so i need the url field to accept null entries ... is this as simple as changing the url field in phpmyadmin so that the url field is no longer unique?

Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,751
#2: Jul 4 '08

re: Unique Field


Hi. Welcome to Bytes!

A unique field should be able to accept multiple null values, given that it was not created with the
"Not Null" option.
Newbie
 
Join Date: Jul 2008
Posts: 2
#3: Jul 5 '08

re: Unique Field


Quote:

Originally Posted by Atli

Hi. Welcome to Bytes!

A unique field should be able to accept multiple null values, given that it was not created with the
"Not Null" option.


Thanx ... bearing in mind it has been created with the not null option ... can i just go in to phpmyadmin and change it?
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,751
#4: Jul 6 '08

re: Unique Field


I'm not sure on the specifics of phpMyAdmin, but you could change the field with an Alter Table query. Like, for example:
Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE myTable
  2. CHANGE theField theField VarChar(100) unique;
  3.  
Reply