Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while($price = mysql_fetch_array($result)){
- if(array_key_exists($price['pricing_id'],$r)){
- // ID exists in the DB and in the query string
- // Update in DB??
- unset($r[$price['pricing_id']); // remove this from the query string array
- }else{
- // ID exists in the DB, but NOT the query string
- // Delete from DB??
- }
- }
- foreach($r as $k => $v){
- // These exist in the query string, but NOT the DB
- // Insert into DB??
- }
Add Comment
Please, Sign In to add comment