Guest User

Untitled

a guest
Jul 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1.  
  2. while($price = mysql_fetch_array($result)){
  3. if(array_key_exists($price['pricing_id'],$r)){
  4. // ID exists in the DB and in the query string
  5. // Update in DB??
  6. unset($r[$price['pricing_id']); // remove this from the query string array
  7. }else{
  8. // ID exists in the DB, but NOT the query string
  9. // Delete from DB??
  10. }
  11.  
  12. }
  13. foreach($r as $k => $v){
  14. // These exist in the query string, but NOT the DB
  15. // Insert into DB??
  16. }
Add Comment
Please, Sign In to add comment