Advertisement
Guest User

Untitled

a guest
Mar 1st, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. /** @noinspection SqlInsertValues */
  2. DB::exec('
  3. INSERT INTO integration_ftp (
  4. `customer_id`,
  5. `supplier_id`,
  6. `time_interval`,
  7. `enabled`,
  8. `host`,
  9. `username`,
  10. `password`,
  11. `products`,
  12. `varieties`,
  13. `orders`,
  14. `local`,
  15. `created_at`
  16. ) VALUES (
  17. :customer_id,
  18. :supplier_id,
  19. :time_interval,
  20. :enabled,
  21. :host,
  22. :username,
  23. :password,
  24. :products,
  25. :varieties,
  26. :orders,
  27. :local,
  28. NOW()
  29. ) ON DUPLICATE KEY UPDATE
  30. customer_id=:customer_id,
  31. supplier_id=:supplier_id,
  32. time_interval=:time_interval,
  33. enabled=:enabled,
  34. host=:host,
  35. username=:username,
  36. password=:password,
  37. products=:products,
  38. varieties=:varieties,
  39. orders=:orders,
  40. local=:local;', [
  41. ':customer_id ' => ($FIC->getClient() instanceof Customer) ? $FIC->getClient()->getId() : null,
  42. ':supplier_id' => ($FIC->getClient() instanceof Supplier) ? $FIC->getClient()->getId() : null,
  43. ':time_interval' => $FIC->getInterval(),
  44. ':enabled' => $FIC->getEnabled(),
  45. ':host' => $FIC->getHost(),
  46. ':username' => $FIC->getUsername(),
  47. ':password' => $FIC->getPassword(),
  48. ':products' => $FIC->getProductsPath(),
  49. ':varieties' =>$FIC->getVarietiesPath(),
  50. ':orders' =>$FIC->getOrdersPath(),
  51. ':local' =>$FIC->getLocal(),
  52. ]);
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement