PHP Code- How to check duplicate entries in Mysql Database
- by yash bhavnani
Hi guys,
I am working on Google checkout API notification URL. I want to apply a check in my php code which will see if transaction ID present in transaction table of my DB, it will exit not process.
I am struggling into applying here. Can somebody help?
I want to check if trasaction ID exists in table of DB it will exit, it will not process:
*case "new-order-notification":
$sql = "update
transactions
set
remote_trans_id=\"".$_REQUEST["google-order-number"]."\", updated=now()
where
id=".$_REQUEST["shopping-cart_items_item-1_merchant-item-id"]."
";
execute($sql, $conn);
break;*
Regards