Tag: simpledb

  • Getting the Value of a count(*) Query in SimpleDB

    Summary: AWS SimpleDB queries return a multidimensional object, not a simple value. Look at the returned object to see which property you need and how to reference it.   When my app creates users, it firsts checks to see if the username entered by the new user is already in use. I do that with…

  • AWS SimpleDB and Auto Incrementing Primary Keys

    I wanted some of my items in simpledb to have unique identifiers. SimpleDB does not provide this function natively because it’s not an RDBMS. Here’s my solution: Before inserting a new item, get the id from the last item in the domain with this select: $query = $sdb->select(“select id from `domain` where id is not…

  • Explicitly Setting an AWS SimpleDb Region in PHP

    I am experimenting with AWS SimpleDB on a new PHP project. When I attempted to query a domain, I got no response. I used firephp (firephp.org) to log the result of the query in firebug. The result was a CFResponse object. By looking inside the object, I saw that it produced a “No such domain”…