Gossamer Forum
Quote Reply
ExpiryDate
Hi,

Got a weird one here - probably just having a brain freeze moment =)

Code:
SELECT * FROM glinks_Links WHERE ExpiryDate > 2147483647

..give 0 results

Code:
SELECT ExpiryDate FROM glinks_Links WHERE ID = 58803

The Link 58803 has an ExpiryDate of 2008/10/15 00:00:00 - which converts to 1224054000 -- which is LESS than 2147483647.

I always thought if a link wasn't set as a paid listing, the ExpiryDate was set to 2147483647 - so doing:

Code:
SELECT * FROM glinks_Links WHERE ExpiryDate > 2147483647

...should give you the listings that have been paid.

As I said - probably a stupidity moment, but if anyone can help, would be much appreciated =)

TIA

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!
Quote Reply
Re: [Andy] ExpiryDate In reply to
BTW, the query is:

Code:
my $sth = $DB->table('Links')->select( GT::SQL::Condition->new('ExpiryDate','>','2147483647') ) || die $GT::SQL::error;

..which gives no results (as I was expecting)

Using:
Code:
my $sth = $DB->table('Links')->select( GT::SQL::Condition->new('ExpiryDate','<','2147483647') ) || die $GT::SQL::error;

..gives ALL of the links in the list Unimpressed

I've even tried:

Code:
'ExpiryDate','>',time


BTW - this is in a pluign, rather than global.

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!
Quote Reply
Re: [Andy] ExpiryDate In reply to
Quote:
SELECT * FROM glinks_Links WHERE ExpiryDate > 2147483647

Shouldn't it be
SELECT * FROM glinks_Links WHERE ExpiryDate < 2147483647 ?
Quote Reply
Re: [Alba] ExpiryDate In reply to
Hi,

Thanks for the reply.

I've tried both :/

This is the default:

2147483647 (i.e "non-paid")

This if for 2008/10/15 00:00:00

1224054000

..but the 2008 date is LESS than 2147483647 .. which is the bit thats got me confused :/

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!
Quote Reply
Re: [Andy] ExpiryDate In reply to
Perhaps I'm misunderstanding here but 2008 should be less than 2147483647 because
2147483647 is January 19, 2038
Quote Reply
Re: [Alba] ExpiryDate In reply to
haha - I think you have a point =)

I just assumed that it was Jan 1970 Pirate

Thanks for point that out! (having a bit of a brain dead week so far :/)

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!
Quote Reply
Re: [Alba] ExpiryDate In reply to
Hi,

Ah ha - worked out why I was getting more results that I was expecting =) Some entries had ExpiryDate's of -1

Quote:
ExpiryDate
-1
-1
-1
-1
1203689463
1203690341
1224054000
2147483647
2147483647
2147483647

That'd be why it was matching more than the results I was expecting <G>

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!