Why should you use that instead of using SQL like it's meant to be?
store each property in a field, then use the key to index...
I can't think why you should prefer storing the hash in any other way...
"Chris" <[EMAIL PROTECTED]>
Enviado por: [EMAIL PROTECTED]
02/05/2005 16:30
Chris wrote:
> I can now turn the %hash into text, but I don't understand how to make it
> correctly formatted.
>
> ---
> %hash = (
> 'John' => {
> 'eyes' => 'green',
> 'hair' => 'brown',
> 'clothes' => { 'boots'=>'bl
On 5/2/05, Suresh Govindachar <[EMAIL PROTECTED]> wrote:
> Chris Sent on 2 May 2005 16:02:02 -0400:
>
> > I can now turn the %hash into text, but I don't understand
> > how to make it correctly formatted.
> >
> > ---
> > %hash = (
> > 'John' => {
> >
Chris Sent on 2 May 2005 16:02:02 -0400:
> I can now turn the %hash into text, but I don't understand
> how to make it correctly formatted.
>
> ---
> %hash = (
> 'John' => {
> 'eyes' => 'green',
> 'hair' => 'brown',
>
YAML doesn't support nested hashes. I wish it did.
-Original Message-
From: Chris Cappelletti [mailto:[EMAIL PROTECTED]
Sent: Monday, May 02, 2005 4:46 PM
To: Chris
Subject: RE: Store hash in SQL - Data::Dumper
I read some of that YAML thing, and that's probably what you want to use.
> All,
>
> I'm looking for a way to store a large hash within an SQL field and
recall
> it at a later time. I can't seem to find any modules that will convert
> hashes to text and back again, but have found plenty of XML modules that
> don't seem to work. Any ideas?
>
> - Chris
Take a look at the
I can now turn the %hash into text, but I don't understand how to make it
correctly formatted.
---
%hash = (
'John' => {
'eyes' => 'green',
'hair' => 'brown',
'clothes' => { 'boots'=>'black','shirt'=>'green'
Can you just do something like the following?
my @sqlarray;
foreach my $key (keys %hash)
{
push(@sqlarray,$key,$hash{$key});
}
my $sqlscalar = join("|",@sqlarray);
# ... database update
Then when you retrieve it from the database you can just use map to put the
hash back together.
-Pet
YAML should work.
http://search.cpan.org/dist/YAML/
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Chris
> Sent: Monday, May 02, 2005 10:31 AM
> To: perl-win32-users
> Subject: Store hash in SQL
>
> All,
>
> I'm looking for a way to store a
>
> I just wanted to add that this is standard Windows multiline textbox
> behavior. Tab and Enter keys are kept within the control because they
> are supposed to be and that is most likely what your users will be
> expecting. Redefining this standard UI behavior is not recommended
> but obviou
All,
I'm looking for a way to store a large hash within an SQL field and recall
it at a later time. I can't seem to find any modules that will convert
hashes to text and back again, but have found plenty of XML modules that
don't seem to work. Any ideas?
- Chris
_
11 matches
Mail list logo