Gossamer Forum
Home : General : Perl Programming :

manipulating data before storing

Quote Reply
manipulating data before storing
 after lots of testing i have:

Code:
foreach ( keys %{$self->{db}->cols} ) {
next unless ($self->{db}->cols->{$_}->{'type'} eq 'DATE' );
$tmp = $self->{cgi}->{$_};
}
so i have determined that i have successfully found data field with type = DATE; $tmp is the current value of the data field. i want to send $tmp to a subroutine to change the format of the string. i thought i could use:

$self->{cgi}->{$_} = my_sub($tmp);

but even if i have a useless sub like

sub my_sub {
my ($data) = $_[0];
return '01-01-2010';
}

it seems to lock up and never comes back to rest of script. must be something simple but what?
Quote Reply
Re: [delicia] manipulating data before storing In reply to
Mmm,. not sure why that would lock up

Have you tried:

Code:
$tmp = $self->{cgi}->{$_};
$tmp = my_func($tmp);

...and then your function called there?

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] manipulating data before storing In reply to
tried that again and it kept saying page loading. simplified subroutine by removing all the real stuff after my useless return and got it to work. so i added back the real stuff till it broke. one of the variables didn't have 'my'. once i added that, it worked.
Quote Reply
Re: [delicia] manipulating data before storing In reply to
Ah wow - thats a bit silly! Can't believe it didn't give an error though! I seem to remember I had the same problem when working with DBManSQL on your site a little while back. Maybe an issue GT need to look into Wink

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] manipulating data before storing In reply to
well, since they've dropped dbman sql, i don't think GT will do anything. they never got back to me about my customization request and now i know why! unless someone can recommend another good front-end for mysql, i guess i'm stuck with no support.
Quote Reply
Re: [delicia] manipulating data before storing In reply to
Who did you e-mail? You should have gotten a response.

Adrian
Quote Reply
Re: [delicia] manipulating data before storing In reply to
Hi Delicia,

To the best of my knowledge, we've replied to all the support tickets you've submitted including the custom changes you asked for, so I'm a little puzzled as to this post that states that we never got back to you... If there is a particular issue you wanted to speak to us about, please send another support request and we'll make sure that someone at least replies to you, but I hope you understand that we do reserve the right to not take on the work if the work/cost ratio doesn't allow us to take it on.

Thank you,

Jack.
-------------------------------------------------------------------------------------------
Jack Ong, C.O.O., Gossamer Threads, Inc.
9th Floor, 100 West Pender, Vancouver, BC, Canada, V6B 1R8
Email: <jack@gossamer-threads.com>
Tel: (604) 687-5804 Fax: (604) 687-5806
Quote Reply
Re: [Jack] manipulating data before storing In reply to
i have no outstanding support tickets and all those were answered timely. i sent two requests for customization to dbman sql for which i have not received quotes etc. meanwhile, i completed the first customization myself. i haven't started the second, on deleting users, and am still interested in a quote. i will email the specs to you again in case the first email got lost.