in reply to Re: Inserting Hash Information Into MySQL
in thread Inserting Hash Information Into MySQL
It inserts the ID without a problem. The only issue is that arrays can't be stored in MySQL, but I don't know how to get the information out of the array to store it otherwise.my $insert_query = "INSERT INTO test(id, stats) VALUES (?, ?);"; $sth = $dbh->prepare($insert_query); while(($key, $value) = each(%hash)){ $sth->execute($key, $value); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Inserting Hash Information Into MySQL
by morgon (Priest) on Jun 20, 2012 at 15:43 UTC | |
by Anonymous Monk on Jun 20, 2012 at 17:23 UTC |