Advertisement
Guest User

Untitled

a guest
Dec 25th, 2012
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.10 KB | None | 0 0
  1. $query = "INSERT INTO {{ t('Settings') }}
  2.           (
  3.               site_id,
  4.               settings_part_id,
  5.               name,
  6.               title,
  7.               description,
  8.               order_id,
  9.               class,
  10.               rules,
  11.               value,
  12.               created_ts
  13.           )
  14.           VALUES
  15.           {{ BEGIN Values }}
  16.           (
  17.               {{ i(site_id) }},
  18.               {{ i(settings_part_id) }},
  19.               {{ s(name) }},
  20.               {{ s(title) }},
  21.               {{ snul(description) }},
  22.               {{ i(order_id) }},
  23.               {{ s(class) }},
  24.               {{ jsonEncode(rules) }},
  25.               {{ s(value) }},
  26.               {{ now() }}
  27.           ){{ UNLESS _last }},{{ END }}
  28.           {{ END }}
  29.           ON DUPLICATE KEY UPDATE
  30.               name = VALUES(name),
  31.               title = VALUES(title),
  32.               description = VALUES(description),
  33.               order_id = VALUES(order_id),
  34.               class = VALUES(class),
  35.               rules = VALUES(rules),
  36.               value = VALUES(value)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement