use a relative link if this will be hosted on the same site, that way you
don't have to deal with domains
barchart.php &sport_type.html & chart.php
all in the folder ( chart=> www => wamp server)
i put this link:
"http://10.0.2.2/chart/barchart.php"
but it does not work:(
This apear in browser-- The server at 10.0.2.2 is taking too long to
respond.--
Is there specific library must download in my computer to work in google
chart??
This out put when open the chart.php in browser
'Date_of_Measure', 'type' => 'date'), array('label' => 'BloodGlucose',
'type' => 'number'), ); $rows = array(); while($r =
mysql_fetch_assoc($sth)) { $temp = array(); $temp[] = array('v' => (string)
$r['Date_of_Measure']); $temp[] = array('v' => (int) $r['BloodGlucose']);
$rows[] = array('c' => $temp); } $table['rows'] = $rows; $jsonTable =
json_encode($table); echo $jsonTable; mysql_close($db); ?>
thank you
...
On Friday, March 15, 2013 9:18:55 PM UTC+3, asgallant wrote:
>
> Ok, you've got 3 topics going now, let's try to consolidate these. I made
> some tweaks to these files which should correct most of the problems (there
> were a lot of syntax errors in the javascript), try them and see if they
> work. If they don't, open chart1.php in a browser and post the string that
> it outputs here.
>
> On Friday, March 15, 2013 10:27:26 AM UTC-4, [email protected] wrote:
>>
>> help me :(
>> I sure the codes are correct but when submit does not apeare the chart..
>>
>> On Friday, March 15, 2013 3:11:42 PM UTC+3, [email protected] wrote:
>>>
>>> Hi,,
>>> I need display bar or pie chart
>>> depend of user choice
>>> and take the data from Mysql data base
>>>
>>> i put the code..
>>> because the does not work
>>> i do not know where is the error
>>> please help me to find it,,:(
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 08, 2013 at 11:06 PM
-- Server version: 5.5.24-log
-- PHP Version: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `rpms`
--
-- --------------------------------------------------------
--
-- Table structure for table `diabetes`
--
CREATE TABLE IF NOT EXISTS `diabetes` (
`Patient_ID` varchar(10) NOT NULL,
`Date_of_Measure` date NOT NULL,
`Time` time NOT NULL,
`BloodGlucose` int(3) NOT NULL,
`postMeal` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`Patient_ID`,`Date_of_Measure`,`Time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `diabetes`
--
INSERT INTO `diabetes` (`Patient_ID`, `Date_of_Measure`, `Time`, `BloodGlucose`, `postMeal`) VALUES
('123456789', '2013-03-07', '09:29:49', 25, 0),
('123456789', '2013-03-07', '09:30:22', 5, 0),
('123456789', '2013-03-07', '09:43:52', 15, 0),
('123456789', '2013-03-07', '09:44:34', 85, 1);
-- --------------------------------------------------------
--
-- Table structure for table `doctor`
--
CREATE TABLE IF NOT EXISTS `doctor` (
`ID` varchar(10) NOT NULL,
`F_name` varchar(15) NOT NULL,
`S_name` varchar(15) DEFAULT NULL,
`L_name` varchar(15) NOT NULL,
`Gender` varchar(6) NOT NULL,
`Work_phone` varchar(9) NOT NULL,
`Specialist` varchar(200) NOT NULL,
`password` varchar(10) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `doctor`
--
INSERT INTO `doctor` (`ID`, `F_name`, `S_name`, `L_name`, `Gender`, `Work_phone`, `Specialist`, `password`) VALUES
('1081973271', 'mohammad', 'Second Name', 'ahmad', 'male', '056710549', 'generalt', 'qwre'),
('1234567890', 'yuFirst Name', 'Second Namehh', 'gLast Name', 'Gender', '3256980', 'Specialist', 'password'),
('33333', 'First Name', 'Second Name', 'Last Name', 'Gender', 'Work Phon', 'Specialist', 'password'),
('ID', 'First Name', 'Second Name', 'Last Name', 'Gender', 'Work Phon', 'Specialist', 'password'),
('Mohammad', 's', 'd', 'd', 'd', 'd', 'd', 'd');
-- --------------------------------------------------------
--
-- Table structure for table `food`
--
CREATE TABLE IF NOT EXISTS `food` (
`item_name` varchar(30) NOT NULL,
`Unit` varchar(20) NOT NULL,
`Calories` decimal(5,2) NOT NULL,
`carbohydrates` decimal(5,2) DEFAULT NULL,
`category` varchar(20) NOT NULL,
PRIMARY KEY (`item_name`),
KEY `category` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `food`
--
INSERT INTO `food` (`item_name`, `Unit`, `Calories`, `carbohydrates`, `category`) VALUES
('apple', '1', '45.00', '123.00', 'fruits'),
('appliie', '1', '12.00', '120.00', 'fruits');
-- --------------------------------------------------------
--
-- Table structure for table `patienfood`
--
CREATE TABLE IF NOT EXISTS `patienfood` (
`Patient_ID` varchar(10) NOT NULL,
`Date_of_Measure` date NOT NULL,
`Time` time NOT NULL,
`carbohydrates` decimal(5,2) DEFAULT NULL,
PRIMARY KEY (`Patient_ID`,`Date_of_Measure`,`Time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `patients`
--
CREATE TABLE IF NOT EXISTS `patients` (
`id` varchar(10) NOT NULL,
`F_name` varchar(15) NOT NULL,
`S_name` varchar(15) DEFAULT NULL,
`L_name` varchar(15) NOT NULL,
`Gender` varchar(6) NOT NULL,
`E_mail` varchar(100) NOT NULL,
`Date_of_Birth` date NOT NULL,
`Mobile_number` varchar(10) DEFAULT NULL,
`Date_of_registration` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`password` varchar(10) NOT NULL,
`Doc_id` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `E-mail` (`E_mail`),
KEY `F_name` (`F_name`,`L_name`,`Doc_id`),
KEY `Doc_id` (`Doc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `patients`
--
INSERT INTO `patients` (`id`, `F_name`, `S_name`, `L_name`, `Gender`, `E_mail`, `Date_of_Birth`, `Mobile_number`, `Date_of_registration`, `password`, `Doc_id`) VALUES
('100550011', 'sss', NULL, 'ss', 'female', 'ssss', '2013-03-07', NULL, '2013-03-03 22:11:41', 'sss', NULL),
('1081973271', 'sara', NULL, 'almaghrabi', 'female', '[email protected]', '1990-10-17', NULL, '2013-03-03 21:58:03', '2323', NULL),
('123456789', '??', '?', '?', '?', '???', '2013-03-07', NULL, '2013-03-19 21:00:00', '??', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `pressure`
--
CREATE TABLE IF NOT EXISTS `pressure` (
`Patient_ID` varchar(10) NOT NULL,
`Date_of_Measure` date NOT NULL,
`Time` time NOT NULL,
`BloodPressureSystolic` int(3) NOT NULL,
`BloodPressureDiasystolic` int(3) NOT NULL,
`Pulses_Rate` int(3) NOT NULL,
PRIMARY KEY (`Patient_ID`,`Date_of_Measure`,`Time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pressure`
--
INSERT INTO `pressure` (`Patient_ID`, `Date_of_Measure`, `Time`, `BloodPressureSystolic`, `BloodPressureDiasystolic`, `Pulses_Rate`) VALUES
('1081973271', '2013-03-01', '00:00:02', 12, 12, 12),
('123456789', '2013-03-07', '08:23:23', 25, 122, 2),
('123456789', '2013-03-07', '08:24:17', 0, 0, 0),
('123456789', '2013-03-07', '08:43:51', 0, 0, 0);
--
-- Constraints for dumped tables
--
--
-- Constraints for table `diabetes`
--
ALTER TABLE `diabetes`
ADD CONSTRAINT `diabetes_ibfk_1` FOREIGN KEY (`Patient_ID`) REFERENCES `patients` (`id`);
--
-- Constraints for table `patienfood`
--
ALTER TABLE `patienfood`
ADD CONSTRAINT `patienfood_ibfk_1` FOREIGN KEY (`Patient_ID`) REFERENCES `patients` (`id`);
--
-- Constraints for table `patients`
--
ALTER TABLE `patients`
ADD CONSTRAINT `patients_ibfk_1` FOREIGN KEY (`Doc_id`) REFERENCES `doctor` (`ID`);
--
-- Constraints for table `pressure`
--
ALTER TABLE `pressure`
ADD CONSTRAINT `pressure_ibfk_1` FOREIGN KEY (`Patient_ID`) REFERENCES `patients` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;