While learning to use the Amazon SimpleDB services I looked for a sample PHP program. I could not get the one Amazon provides to work. Dan Myers’ wrote a SimpleDB PHP class but there was no sample code to use it.
This is a collection of small programs that use Dan Myers’ SimpleDB PHP class.
This is a very simple set of examples of working with the Amazon SimpleDB. It is written on top of Don Myers’ SimpleDB PHP class.
Download simpledbsamples.zip V1.0 July 28, 2009
Rich Helms firstname.lastname@example.org
Uses Amazon SimpleDB PHP Class http://sourceforge.net/projects/php-sdb/ by heronblademastr
* listdomains [list all domains]
* createrecord (single) and domain tag [check if the "tag" domain exists and if not create, then create a record]
* getrecord (single) in domain tag [list that specific record]
* deleterecord (single) in domain tag [delete that specific record]
* createrecords and domain tag [bulk load records]
* listrecords in tag [list all records in tag domain]
* deletedomain tag [delete tag domain]
To install, configure config.inc.php with your awsAccessKey and awsSecretKey.
Copy to the host. Run index.php
Note: An important concept with SimpleDB is Eventually Consistent. This means when you update, add or delete a record you will not see it immediately. This is why the programs are broken into small programs, to give the system time to reflect the updates.
For details see:
This is a detailed report
Docs at Amazon on it