Gossamer Forum
Home : Products : Gossamer Links : Discussions :

HOw can i allow only 1 URL per database

Quote Reply
HOw can i allow only 1 URL per database
How can I do this. Only one URL! Please help!

Quote Reply
Re: HOw can i allow only 1 URL per database In reply to
I'm not sure what you are asking, but if you mean, do not allow people to upload the same url more than once,...

You would need to make the URL field a "Unique" field. I'm not sure if that would cause any other problems, and errors might not be trapped properly, but it would prevent duplicate URL's from being added.

Alex would need to comment on if that would muck anything up, since that is one of the internal fields of Links.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Plugins:http://LinkSQL.com/plugin
Quote Reply
Re: HOw can i allow only 1 URL per database In reply to
Thanks for your reply. How can I make the field unique?

Quote Reply
Re: HOw can i allow only 1 URL per database In reply to
In mysqlman, carefully click on the Links table "properties" then click "unique" next to the URL field.

You will have to "Check Duplicates" and get rid of all duplicates before that can happen though.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Plugins:http://LinkSQL.com/plugin
Quote Reply
Re: HOw can i allow only 1 URL per database In reply to
does unique mean mysit.com is the same as
www.mysite.com
www.mysite.com/
www.mysite.com/index.html
www.mysite.com/index.htm


Quote Reply
Re: HOw can i allow only 1 URL per database In reply to
 
From what I know the examples you gave would all be considered 'different' (ie. not identical) if entered into a mysql table field that was set to unique.

You'd have to write some code with sql to check your example, eg '%.mysite.com%' to block out /all/possible/subdirectories/off the main site as well. It should be as easy as adding it into the existing add script.

Cheers,
R.