leeqs (2) [Avatar] Offline
#1
I uploaded the application code of ch11 to my own server, and succeed inport the ch11_data.sql into the postgresql database, I can also view the data via pgAdmin III. Then, I visit the ch11/datafeeder.php?format=json on the localhost,
Fatal error: Call to a member function GetRows() on a non-object in /opt/fgs/www/htdocs/ch11/datafeeder.php on line 49.
finall I found there is something wrong withe the sql ,
SELECT state as id, state As state_name,year_adm, ST_AsGeoJSON(ST_SimplifyPreserveTopology(ST_Transform(the_geom,900913),1000)) As geom
FROM us.states
WHERE state IN('Massachusetts', 'Rhode Island', 'Connecticut','Maine', 'New York', 'Pennsylvania')
I execute the sql in the pgAdmin III,

ERROR: schema "us" does not exist
LINE 2: FROM us.states
^
ERROR: schema "us" does not exist.
I don't know what to do.
regina.leo (265) [Avatar] Offline
#2
Re: ch11 Fatal error: Call to a member function GetRows()
Leeqs -- sorry that was before we decided that each chapter should have its own set of data.

The us.states table is created in Chapter 7 Listing 7.2.
leeqs (2) [Avatar] Offline
#3
Re: ch11 Fatal error: Call to a member function GetRows()
Thank you very much, I skiped ch07 while studying your book!
John Fries (3) [Avatar] Offline
#4
Re: ch11 Fatal error: Call to a member function GetRows()
I just bought "PostGIS in Action" and am trying to get Chapter 11.5 "Displaying data with server-side web scripting" working.

I donĀ“t understand where to put "data_json.tpl" so that it will be find or what it has to contain (only the small script-part in the book?), because there must be some problem.

Warning: Smarty error: unable to read resource: "data_json.tpl" in CsmilieampphtdocswebapplibssmartySmarty.class.php on line 1093

If not here, where can I ask for help concerning this PostGIS Example?

Thank You
regina.leo (265) [Avatar] Offline
#5
Re: ch11 Fatal error: Call to a member function GetRows()
John,

sorry I missed this earlier question. Answered it in your subsequent post.

This si the right place to ask for this question. For more general PostGIS specific questions you can subscribe and post to PostGIS users group:

http://postgis.org/mailman/listinfo/postgis-users
alexsmtih (2) [Avatar] Offline
#6
Re: ch11 Fatal error: Call to a member function GetRows()
These kind of post deserve to be read and appreciated, good quality content so I am happy to find more points on this particular topic.

Message was edited by:
alexsmtih