Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 5th, 2000, 05:00 PM
petew00 petew00 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 4 petew00 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Fetching data into 'Lists of lists': HELP!!

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap