Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Date Field Blues

Quote Reply
Date Field Blues
Hi,

I have just added a date field to Links (which I just downloaded) and have set it to NOT NULL with a default of 0000-00-00.

When I go to insert a new link, instead of defaulting to 0000-00-00 - it displays todays date???

Can I fix this somewhere?

Cheers,
Regan.
Quote Reply
Re: Date Field Blues In reply to
What version of your LInks SQL?
Because the value for Date_Add field is today.
You can go to the add.cgi file(Links SQL version 2.0.4 and older) or Add.pm to change to your default value.

Beck

Quote Reply
Re: Date Field Blues In reply to
Hi,

I downloaded Links SQL today, so whatever is the latest version is what I have.

I have already set the default when making the new column? Can you tell me where about I'd find the line that does the date call in Add.pm.

Cheers,
REgan.
Quote Reply
Re: Date Field Blues In reply to
Hi Again,

Was just wondering, if I change the code in Add.pm, it's not going to stuff up the other dates on the page is it? ie. the add date?

The date field I've added is something seperate.

Cheers,
Regan.
Quote Reply
Re: Date Field Blues In reply to
Anybody?

Where I said it displays todays date, this happens in the new date field 'before' I insert the link. What I want it to do is come up with the default value set.

Cheers,
REgan.
Quote Reply
Re: Date Field Blues In reply to
Hi,

Do you want it to default as all 0000? GT::SQL rewrites this to NOW() so it defaults to today.

You could leave the default blank, that should work.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Date Field Blues In reply to
Hi Alex,

Thanks for that, I'll give it a go leaving it blank in the default setting. Yip, I want this particular field to default to 0000-00-00 as this is the value which for links that will never expire (ties in with my expire mod).

Cheers,
Regan.
Quote Reply
Re: [Alex] Date Field Blues In reply to
Alex,

Is this rewriting a default value of '0000-00-00' as NOW() but "NULL" is left as 'NULL'




PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.