[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need Some PERL-MySQL help
On Wed, Feb 25, 2009 at 08:44:45AM -0600, Gowtham wrote:
> The first query is done to a database on one
> server. The results are stored in memory. The
> second query is done to a database in another
> server. The results are stored in memory.
>
Okay then, yes thats in the oddball category.
You should just be able to store them in different variables and then
merge one array with the other (my perl is a bit rusty so this may only
be vaguely correct)
$res1 = mysql_query1
$res2 = mysql_query2
for($i=0; $i<=$#res2; $i++) {
$res1[$#res1 + 1] = $res2[$i];
}
if the returned variables aren't really lists you can just do this
twice:
my @res;
for($i=0; $i<=$#res1; $i++) {
$res[$#res + 1] = $res1[$i];
}
for($i=0; $i<=$#res2; $i++) {
$res[$#res + 1] = $res2[$i];
}
--
Jon
"You're talking about a group of people who are paid large sums of money for
their ability to communicate with inanimate objects made of melted sand."
-NANOG