Hi Ken,
the reason you lose your data is simple. You have something of the form:
$myscalar = "A weird hested hash";
you then try to add an entry by doing:
$myscalar = "Some other data";
What you look at it like that, it's clear what is going wrong. What you
want is:
$tablename{$table}{"con_name"} = ["constraint_name"];
<Happy to explain hested hashes off list>
R
At 11:24 30/09/2002 -0400, Ken Hammer wrote:
> A strange question.
>
> I'm using the following data structure to
>store information from a data base query:
>
>$tablename{"$table"} = {
> "table_name" => ["$table"],
> "index_name" => ["$index_name"],
> "columns" => ["@column_name"],
> "type" => ["$index_type"],
> "tablespace" => ["$tablespace_name"]
>
> This works great and I can later extract the info
>from this structure. I have 2 questions. What type of
>structure is this and how do I add to it?
>
> When I try to add more info from a subsequent query like
>this:
>
>$tablename{$table} = {
> "con_name" => ["$constraint_name"],
> "con_type" => ["$type"],
> "rem_con_name" => ["$r_constraint_name"],
> "created_by" => ["$generated"]
> };
>
> I lose all the previous information, so that only the above
>is now stored.
> What have I done, how do I do what I want, and am I in over my head?
>
>--
>Ken
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]