select pid as 'id',pnameth 'name',if(now() between pflash_start and pflash_end,pflash_price,pprice) as 'price',pphoto 'photo',pstatus 'status'
,if( (now() between pflash_start and pflash_end) and pprice<pfullprice and pfullprice>0 ,pprice,pfullprice) 'fullprice',pcategory,psubcatogory,psscategory,pcharacter from dex_product where pactivate=1 and phide=0 and (porder_end=0 or porder_end>now()) and ( pnameth like '%%https://www.amazon.co.jp/s?rh=n%3A10539834051&fs=true&ref=lp_10539834051_sar%%' or pnameen like '%%https://www.amazon.co.jp/s?rh=n%3A10539834051&fs=true&ref=lp_10539834051_sar%%' or ptag like '%%https://www.amazon.co.jp/s?rh=n%3A10539834051&fs=true&ref=lp_10539834051_sar%%' or pid='https://www.amazon.co.jp/s?rh=n%3A10539834051&fs=true&ref=lp_10539834051_sar' or pbarcode='https://www.amazon.co.jp/s?rh=n%3A10539834051&fs=true&ref=lp_10539834051_sar' ) and pstatus<>'Preorder' order by pid desc limit 0,30