You are here

function amazon_media_amazon_item_delete in Amazon Product Advertisement API 7

Same name and namespace in other branches
  1. 6 amazon_media/amazon_media.module \amazon_media_amazon_item_delete()
  2. 7.2 amazon_media/amazon_media.module \amazon_media_amazon_item_delete()

Delete a record using the asin as key.

Parameters

$asin: the asin to delete.

File

amazon_media/amazon_media.module, line 168
Provides additional behaviors and data type for amazon items which are DVDs, software, video games, music, etc.

Code

function amazon_media_amazon_item_delete($asin) {

  // This is pretty inefficient; we're going to thrash these tables
  // every time a product gets deleted or updated. We'll solve it later.
  db_delete('amazon_book')
    ->condition('asin', $asin)
    ->execute();
  db_delete('amazon_dvd')
    ->condition('asin', $asin)
    ->execute();
  db_delete('amazon_music')
    ->condition('asin', $asin)
    ->execute();
  db_delete('amazon_software')
    ->condition('asin', $asin)
    ->execute();
}