Current location: Hot Scripts Forums » Programming Languages » PHP » SQL and jpgraph 1.15


SQL and jpgraph 1.15

Reply
  #1 (permalink)  
Old 06-16-04, 10:12 AM
Worm's Avatar
Worm Worm is offline
Newbie Coder
 
Join Date: Jun 2004
Location: Germany, Frankfurt am Main
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
SQL and jpgraph 1.15

Hi Folks !

I implemented JPGraph into some project of mine and it works well. I can draw graphs, fill them with values and make simple pies or something. My only problem is filling the data-variable with data from my mysql-database.

I wrote some statements like this:

PHP Code:

$SQL "SELECT `Pos.typ`, `Einzelpreis` FROM `vertragsbestand` WHERE `Pos.typ` > ''"
   
$RESULT mysql_query($SQL); 
   if (
$myrow=mysql_fetch_array($RESULT)) { 
      do { 
         
$data[] = $myrow["Einzelpreis"];  //It would not create the graphs without using '[]' 
         
$data_names[] = $myrow["Pos.typ"]."(".$myrow["Einzelpreis"].")"
      }while (
$myrow=mysql_fetch_array($RESULT)); 
   } 
But JPGraph always keeps buggin me every time i try to recieve data from the query-result (mysql_fetch_array() f.e.). The query itself on another page without jpgraph works fine. Any ideas ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 10:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.