Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中 
php多條件判斷重複
Jul 28th 2013, 13:38

$result=mysql_query("select * from shop_goods where goods_name='{$_POST['goods_name']}'");
if (mysql_num_rows($result)>0){
echo "history.go(-1); alert('商品名稱已存在')";

這只是新增時單純判斷goods_name裡有沒有重複的名稱

那如果要增加條件
例如:
在台灣(goods_country) and 台北縣(goods_area) 下有沒有重複的goods_name名稱
我因該要怎麼寫才好呢?

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 kkoki0httzobg 的頭像
    kkoki0httzobg

    線上遊戲排行榜2013/2014,進擊的巨人線上看,candy crush saga外掛,正妹寫真三圍

    kkoki0httzobg 發表在 痞客邦 留言(0) 人氣()