Database Reference
In-Depth Information
The deleteItem method
Deleting an item is quite an easy job; you can simply invoke the deleteItem method
specifying the table name and item primary key, as shown in the following code:
$response = $client->deleteItem(array(
'TableName' => 'Book',
'Key' => array(
'Id' => array(
Type::NUMBER => 2001
)
)
));
The batchGetItem API
With the batchGetItem API, we can fetch multiple items from various tables in one
go. In the following code, we are fetching two items from the Authors table at a time.
$response = $client->batchGetItem(array(
"RequestItems" => array(
"Authors" => array(
"Keys" => array(
array( // Key #1
"authId" => array( Type::NUMBER =>
"5001"),
),
array( // Key #2
"Id" => array( Type::NUMBER => "5002"),
),
)
)
)));
Search WWH ::




Custom Search