Gossamer Forum
Home : General : Perl Programming :

unblessed error

Quote Reply
unblessed error
first, let me apologize for my ignorance as i'm a trial and error programmer. i'm trying to do something that seems it should be easy. when i modify a record in dbman SQL, i want to automatically set a field to the current date. the following code is already in the script to set a userid field:
Code:
$self->{cgi}->{$self->{cfg}->{'auth_user_field'}} = $self->{user}->{Username};

so i tried adding the following:
Code:
use GT::Date qw/:all/;
$self->{cgi}->$self->{glb_cfg}->{default_updated_field} = GT::Date::date_get();
and get the following error:
Can't call method "Dbsql::Home=HASH(0x11b86c)" on unblessed reference at Dbsql::Home::modify_record line 34.
what am i missing please???
Quote Reply
Re: [delicia] unblessed error In reply to
Hi,

What is it you are trying to achieve? Setting a default value for a field? If so, this should be possible in the DBManSQL admin area (just set a default for the field)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] unblessed error In reply to
the default value seems to be working, which is the date the record is added. but i want to update a Rec_updated_date field each time a record is modified.
Quote Reply
Re: [delicia] unblessed error In reply to
MMm, stab in the dark - but try:

$self->{cgi}->{$self->{glb_cfg}->{default_updated_field}} = GT::Date::date_get();

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] unblessed error In reply to
that worked! thank you!!!!
Quote Reply
Re: [delicia] unblessed error In reply to
Cool, good to hear Angelic

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates