Monday, February 16, 2009

php SimpleDB files

It took me a while longer to find anything good and the only thing I found was this http://objectcentral.com/paws/ I did find some problems with this script and so I made a few changes myself. I have put everything you need into a zip file. The paws stuff depends on the Amazon folder and they both need to be in the same directory. I didn't want to bother to figure out the include stuff so I just put another copy of both folders in my list directory. Just add the amazon keys to the config file in paws directory and the line include 'paws/pawsSDB.php' into your php files. Then you can make use of all methods on the pawsSDB object.

The changes I made were two small things: 1) on the query method I added a parameter to tell it how many objects you wanted returned at a time. Currently, it defaults to 11 (because of the project) but you can pass in any number you want. 2) The getNextItemName method used to keep calling the last query until all the items that the query returned were sent back to you no matter what you set as the max number of items. I made it so that if you tell it to only return 11 from the query, you only get 11.

Anyway, go forth and do good stuff.

No comments:

Post a Comment