Hi,
    I've spent about 12 hours now trying to figure this out online and
thought I'd give this forum a try.  I'd like to use the Google
Visualization API to visualize data from my postgresql database.

So far I've got a php script that converts a postgresql query into
json format, but can't figure out how to load it from there into the
Google Visualization datatable.

Here's my php file:

<?php
$db_handle = pg_connect("dbname=ADKGIS user=postgres password=gisdb
host=localhost port=5432");
$query = "SELECT gid,janppt FROM prism";
$result = pg_exec($db_handle, $query);
if (!$result) {printf ("ERROR"); exit;}
$myarray = pg_fetch_all ($result);
$json_object= json_encode($myarray);
echo $json_object;
pg_close($db);
?>

Perhaps I'm going about this the wrong way?  Any help would be
appreciated.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to