Search field cannot be blank'; exit; } $query = str_replace(' ', '%20', $query); $asins = AmazonLib::quickSearch($query, $amazon_locale); if(!is_array($asins) || count($asins) == 0) { echo "The search '$query' did not match any products."; exit; } $asins = implode(',', array_slice($asins, 0, 3)); ob_start(); ?>
[amazon_i foreach=""]
[amazon get="title" length="45"]
ASIN: %asin%
[/amazon_i]
View results @ Amazon.com
prefix . 'amazon_cache'; $time = time(); $query = "SELECT asin, field FROM $table WHERE expire < '$time' ORDER BY asin;"; $res = $wpdb->get_results($query, ARRAY_A); $data = array(); foreach($res as $row) { extract($row); if(count($data) == 3 && !isset($data[$asin])) { break; //I'm ashamed of myself } if(!isset($data[$asin])) $data[$asin] = array(); $data[$asin][] = $field; } global $amazon_locale; $junk = amazon_fetch($data, $amazon_locale, true); exit; } } new AmazonAjax(); ?>