Gossamer Forum
Home : General : Databases and SQL :

Re: [courierb] insert hash into db

Quote Reply
Re: [courierb] insert hash into db In reply to
If you want ALL the data from an array, you need something like:

orderdetail => join(" - ", @partofcookie"),

Otherwise, if you only want for example the color, you would use:

orderdetail => $partofcookie[3] ,

However, it looks like the value of the array is a hashref, so you probably need something like:

Code:
orderdetail => get_cookie_vals($partofcookie[0]),

..and then a function :

Code:
sub get_cookie_vals {

my $back;
map {
$back .= "$_ --> $_[0]->{$_} \n"
} keys %$_[0];

return $back;

}

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!
Subject Author Views Date
Thread insert hash into db courierb 14957 Jul 22, 2009, 2:01 AM
Thread Re: [courierb] insert hash into db
courierb 14797 Jul 22, 2009, 2:51 AM
Thread Re: [courierb] insert hash into db
Andy 14762 Jul 22, 2009, 3:32 AM
Thread Re: [Andy] insert hash into db
courierb 14845 Jul 22, 2009, 4:41 AM
Thread Re: [courierb] insert hash into db
Andy 14750 Jul 22, 2009, 4:44 AM
Thread Re: [Andy] insert hash into db
courierb 14788 Jul 22, 2009, 5:27 AM
Post Re: [courierb] insert hash into db
Andy 14756 Jul 22, 2009, 5:31 AM
Thread Re: [courierb] insert hash into db
courierb 14752 Jul 22, 2009, 5:33 AM
Thread Re: [courierb] insert hash into db
courierb 14741 Jul 22, 2009, 5:36 AM
Thread Re: [courierb] insert hash into db
courierb 14731 Jul 22, 2009, 5:38 AM
Post Re: [courierb] insert hash into db
courierb 14702 Jul 22, 2009, 5:41 AM