473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

what kind of data sturcture is this ?

I have a the following code snippet :
Expand|Select|Wrap|Line Numbers
  1.    foreach my $table (keys %config::db_columns)
  2.     {
  3.     my $select_stmt = 'select ' . lc(join(',', @{$config::db_columns{$table}}));
  4.  
  5.     $select_stmt .= " from $table";
  6.     if ($table eq 'employeeview') { $select_stmt .= ' where present=1'; }
  7.  
  8.         my %db_data = undef;
  9.     $sth = $dbh->prepare("$select_stmt");
  10.     if ($sth->execute)
  11.     {
  12.         my $n = 0;
  13.         while (my $hashref = $sth->fetchrow_hashref)
  14.         {
  15.         foreach my $column (@{$config::db_columns{$table}})
  16.         {
  17.             $db_data{$table}[$n]{$column} = $$hashref{$column};
  18.         }
  19.         $n++;
  20.         }
  21.     }
  22.     }
  23.     print "Database upload completed.\n";
  24.  
could some tell me what kind of datastucture is $db_data{$table}[$n]{$column} ?

and some insight of what does the developer intend to do ?
Jan 4 '10 #1
3 1407
numberwhun
3,509 Expert Mod 2GB
That is a nested Hash structure. To learn more about them via examples, check out this link.

Regards,

Jeff
Jan 4 '10 #2
Hi thanks for your reply...the link was very help ful....
also I feel that it is an hash of array of hashes.....
Jan 7 '10 #3
numberwhun
3,509 Expert Mod 2GB
You are right, I missed the middle brackets. :)
Jan 7 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joh | last post by:
Hello, (sorry long) i think i have missed something in the code below, i would like to design some kind of detector with python, but i feel totally in a no way now and need some advices to...
112
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please,...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
3
by: Muhammad Farooq-i-Azam | last post by:
Hi, I am trying to define an arp structure but having problem doing so. I think I have define the correct arp structure but I find myself in a strange problem. The size of structure that I have...
3
by: Kiran B. | last post by:
Hi, I am new to .net. I have two Data Structure Type ... Sturcture A and Structure B. Structure A Public Fname as String Public LastName as String Public City as String Public Zip as String...
5
by: JL | last post by:
Hi, I was asked the following question at work: "Assume that you have 5000 columns and 5000 rows of data. You take these data from the database and need to show them in a table. Before...
16
by: Abhishek | last post by:
why do I see that in most C programs, pointers in functions are accepted as: int func(int i,(void *)p) where p is a pointer or an address which is passed from the place where it is called. what...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
4
by: ink | last post by:
Hi all, I am trying to pull some financial data off of an HTML web page so that I can store it in a Database for Sorting and filtering. I have been thinking about this for some time and trying...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.