|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
I'm trying to create a graph with 'GD::Graph::lines'. To get the job done I need to fill a variable like this:
@data = ( [qw(09:00 09:05 09:10 09:15)], [ (1.0, 1.4, -0.9, -0.4)], ); When I fill in these example-values in the perl-script itself, it works fine and a nice graph is created. However, my data are in a mysql-database, so I have to get them out of the database and into the variable '@data' in the required format (see above). One of the (many) things I tried, is to use a 'push' like this (in accordance with the PERLLOL(1)-manpage): while (@row = $sth->fetchrow_array) { push @data, $LoL["$time"][$value]; } the $time and $value that are passed this way are: 09:00 1.0 09:05 1.4 09:10 -0.9 09:15 -0.4 It doesn't work! The module reports: 'Argument "09:00" isn't numeric in aelem at sample.pl line 40'. I think the variables are not passed into '@data' in the right order. Can anyone tell me how I can fetch the data into the variable '@data' as required by the 'GD::Graph::lines'-module? Thnx in advance... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Fetching data into 'Lists of lists': HELP!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|