Hello, I would like to create an extra field called sign up date which will help me remove any users that are old and haven't validate their account. I would like links sql to add the date automatically when the account is created. I am a newbie can someone walk me through this?
Apr 11, 2003, 1:33 PM
Veteran / Moderator (6956 posts)
Apr 11, 2003, 1:33 PM
Post #6 of 14
Views: 6798
Hi,
a timestamp changes every time the record is altered. (The first timestamp changes, at least)
A few months ago, a thread was done with a variety of solutions, including the one I've been using for over 2 years, since Links 1.x days.
Basically, you set a field in the Links table to default value NOW(), and when the link is created the first time, it's set, then ignored in all future updates.
Timestamps can't be used, but you can use a DATEETIME field.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
a timestamp changes every time the record is altered. (The first timestamp changes, at least)
A few months ago, a thread was done with a variety of solutions, including the one I've been using for over 2 years, since Links 1.x days.
Basically, you set a field in the Links table to default value NOW(), and when the link is created the first time, it's set, then ignored in all future updates.
Timestamps can't be used, but you can use a DATEETIME field.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
Apr 19, 2008, 8:52 AM
Veteran / Moderator (18441 posts)
Apr 19, 2008, 8:52 AM
Post #8 of 14
Views: 6667
Hi,
The easiest way, is to add this in signup_form.html:
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
The easiest way, is to add this in signup_form.html:
Code:
<input type="hidden" value="<%GT::Date::date_get()%>" name="Signup_Date" />Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Apr 19, 2008, 9:28 AM
User (238 posts)
Apr 19, 2008, 9:28 AM
Post #9 of 14
Views: 6647
Andy
thanks, thats great.
When I use the "User: Search form" in the database, the options for searching users by 'signup date' only allows these:
Like
Exact Match
Not equal
Is it possible to configure this to be:
Exact Match
Greater Than
Less Than
Not Equal
Is this something to do with the 'fiedl type'?
Thanks
Colin Thompson
thanks, thats great.
When I use the "User: Search form" in the database, the options for searching users by 'signup date' only allows these:
Like
Exact Match
Not equal
Is it possible to configure this to be:
Exact Match
Greater Than
Less Than
Not Equal
Is this something to do with the 'fiedl type'?
Thanks
Colin Thompson
Apr 19, 2008, 9:31 AM
Veteran / Moderator (18441 posts)
Apr 19, 2008, 9:31 AM
Post #10 of 14
Views: 6645
Hi,
No problem.
Regarding:
Exact Match
Greater Than
Less Than
Not Equal
Is this something to do with the 'fiedl type'?
I don't think that'll be possible. Greater than, less than etc is only available with INT (number) type fields, not dates.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
No problem.
Regarding:
Quote:
Is it possible to configure this to be: Exact Match
Greater Than
Less Than
Not Equal
Is this something to do with the 'fiedl type'?
I don't think that'll be possible. Greater than, less than etc is only available with INT (number) type fields, not dates.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Apr 19, 2008, 9:37 AM
Veteran / Moderator (18441 posts)
Apr 19, 2008, 9:37 AM
Post #12 of 14
Views: 6654
Maybe - you could try changing the field to a DATE field, instead of CHAR/TEXT
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Apr 19, 2008, 11:06 AM
Veteran / Moderator (18441 posts)
Apr 19, 2008, 11:06 AM
Post #14 of 14
Views: 6639
Hi,
Yeah, basically.
You could do it manually in SQL Monitor - something like:
(totally untested, but something like that should work)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Yeah, basically.
You could do it manually in SQL Monitor - something like:
Code:
SELECT COUNT(*) FROM glinks_Users WHERE Signup_Date >= '2008-04-01' AND Signup_Date != '0000-00-00'(totally untested, but something like that should work)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!