views:

814

answers:

3

I followed this to setup PHP on the Google appengine and it works great. Any suggestions on how we can use a database / datastore with this on GAE?

A: 

There's some discussion on a GQL datastore in the tutorial you just linked to.

Google App Engine’s datastore has a SQL-like syntax called “GQL”. Select statements in GQL can be performed on one table only.

And memcached

anyway for the php to access any kind of database. - I know that Memcached is provided by GAE so we can use that by simply adding a key value pair.

Ólafur Waage
+2  A: 

Because Google provides low-level access to the datastore in Java API

http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html

You should be able to access those class using the php-java integration, something like:

 // Get a handle on the datastore itself
 $datastore = new Java('com.google.appengine.api.datastore.DatastoreServiceFactory')->getDatastoreService();

 // Lookup data by known key name
 $userEntity = $datastore->get(new Java('com.google.appengine.api.datastore.KeyFactory')->createKey("UserInfo", email));
yuku
+1  A: 

Hi, see the URL below for an proof of concept how to use SQL CRUD (Create, Retrieve, Update, Delete) in PHP at Google App Engine.

Oops, new users can not post a link. Click on my name below in the right corner and then click on the website url.