setup display(s)


  xval = 30;
  barwidth = floor(300/numoptions);
  for (i=0;i<=(numoptions-1);i++)
  {
      entry = optionsquery->fetchAll(SQLITE_ASSOC);
      voteoption = entry[i]['name'];
      votevalue = voteoption; //sqlite_result(optionsquery,i,'name');
      currentnumquery = db->query("SELECT * FROM poll WHERE vote='votevalue'");
      currentnum = currentnumquery->numRows();
      per = floor((currentnum/numvotes)*184);
      rper = floor((currentnum/numvotes)*100);
      imagefilledrectangle (im, xval, (200-per), (xval+barwidth), 200, red);
      imagerectangle (im, xval, (200-per), (xval+barwidth), 200, black);
      imagestring (im, 1, (xval+(barwidth/2)), 205, voteoption, black);
      imagestring (im, 2, (xval+(barwidth/2)), ((200-per)-15), "rper%", black);
      xval+=(barwidth+10);
  }