Is there any harm in changing the properties of the URL column in the table Links to allow for null entries? My site will allow unpaid links that don't have a URL to be listed in the database.
Dec 23, 2000, 10:08 AM
Veteran / Moderator (6956 posts)
Dec 23, 2000, 10:08 AM
Post #3 of 6
Views: 4353
No....
But as quango said, you'd have to change jump.cgi to prevent errors.
I have posted several versions of jump.cgi that handle various URL configurations from local, to non existent.
Just check the url and figure out what you want it to do if it's ''.
PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ
But as quango said, you'd have to change jump.cgi to prevent errors.
I have posted several versions of jump.cgi that handle various URL configurations from local, to non existent.
Just check the url and figure out what you want it to do if it's ''.
PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ
Dec 24, 2000, 2:12 PM
Novice (32 posts)
Dec 24, 2000, 2:12 PM
Post #4 of 6
Views: 4340
Thanks you guys. I don't think I'll have any problems. My template tests the value in a field called isPaid, and if the value indicates its NOT paid, then no URL is linked. Also, the templates tests the URL field for any content, and if there is none, I have it so it doesn't try to insert a link.
David
David
Dec 25, 2000, 1:14 PM
Novice (32 posts)
Dec 25, 2000, 1:14 PM
Post #5 of 6
Views: 4340
I've run into a problem. When trying to add new listings, I get an error that says the URL field may not be left blank. So I went back to the database to change the properties on that field. When I try to change the field to allow NULL entries, I get an error message that says "MySQL said: Column 'URL' is used with UNIQUE or INDEX but is not defined as NOT NULL".
I don't know enough about SQL to figure out how to fix this problem. Can someone help me. I need to be able to allow the URL to be NULL or empty.
David
I don't know enough about SQL to figure out how to fix this problem. Can someone help me. I need to be able to allow the URL to be NULL or empty.
David
Dec 26, 2000, 7:35 AM
Veteran / Moderator (6956 posts)
Dec 26, 2000, 7:35 AM
Post #6 of 6
Views: 4335
You need to pass in some value. Even if it's just the title as the URL.
Usually, I use "none", a URL starting with http:// or a url starting with /
On the FAQ, I use 'http://' as the "null" value, if if equal to 'http://' consider it a non-jump.
PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ
Usually, I use "none", a URL starting with http:// or a url starting with /
On the FAQ, I use 'http://' as the "null" value, if if equal to 'http://' consider it a non-jump.
PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ