Two Dimensional Array Problem

2005-06-03 Thread ahuber
I am trying to send the output of a mysql query to a two dimensional array. This is what I've tried using push. while (@results = $sth->fetchrow_array ()) { $x = $results[0]; $y = $results[1]; push (@data,[$x],[$y]); } However, I don't get back a two dimensional array, I get back a s

RE: Two Dimensional Array Problem

2005-06-03 Thread brian . barto
day, June 03, 2005 2:42 PM To: beginners@perl.org Subject: Two Dimensional Array Problem I am trying to send the output of a mysql query to a two dimensional array. This is what I've tried using push. while (@results = $sth->fetchrow_array ()) { $x = $results[0]; $y = $results[1]

RE: Two Dimensional Array Problem

2005-06-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: > I am trying to send the output of a mysql query to a two dimensional > array. > > This is what I've tried using push. > > while (@results = $sth->fetchrow_array ()) > { > $x = $results[0]; > $y = $results[1]; > push (@data,[$x],[$y]); push( @data,

Re: Two Dimensional Array Problem

2005-06-03 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: > I am trying to send the output of a mysql query to a two dimensional array. > > This is what I've tried using push. > > while (@results = $sth->fetchrow_array ()) > { > $x = $results[0]; > $y = $results[1]; > push (@data,[$x],[$y]); > } > > However, I don't

RE: Two Dimensional Array Problem

2005-06-03 Thread brian . barto
ubject: RE: Two Dimensional Array Problem [EMAIL PROTECTED] wrote: > I am trying to send the output of a mysql query to a two dimensional > array. > > This is what I've tried using push. > > while (@results = $sth->fetchrow_array ()) > { > $x = $results[0];

RE: Two Dimensional Array Problem

2005-06-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
]; beginners@perl.org > Subject: RE: Two Dimensional Array Problem > > > [EMAIL PROTECTED] wrote: >> I am trying to send the output of a mysql query to a two dimensional >> array. >> >> This is what I've tried using push. >> >> while (@results = $sth-

Re: Two Dimensional Array Problem

2005-06-03 Thread Chris Charley
[snip] Hi Brian, I usually deal with multidimensional arrays this way: $i = 0; while (@results = $sth->fetchrow_array ()) { $x = $results[0]; $y = $results[1]; @points = ($x, $y); $data[$i] = [EMAIL PROTECTED]; $i++; } Just a note about a possible problem with the statement:

Re: Two Dimensional Array Problem

2005-06-05 Thread Wiggins d'Anconia
Always group reply so others can help and be helped, and to avoid getting accidentally ignored. "Because it's up-side down. Why is that? It makes replies harder to read. Why not? Please don't top-post." - Sherm Pendley, Mac OS X list Aaron Huber wrote: > > On 6/3/05, Wiggins d'Anconia <[EMAIL PR