Advertisement
Guest User

Untitled

a guest
Aug 4th, 2015
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. SELECT `id` , `attribs_json`
  2. FROM `products`
  3. WHERE `attribs_json` REGEXP '"1":{"value":[^"3"$]'
  4.  
  5. {"feature":{"1":{"value":"["2","3"]"},
  6. "2":{"value":["1"]},
  7. "5":{"value":""},
  8. "3":{"value":["1"]},
  9. "9":{"value":""},
  10. "4":{"value":"u0633u0627u062au0646"},
  11. "6":{"value":""},
  12. "7":{"value":""},
  13. "8":{"value":""}
  14. },
  15. "show_counter":"0",
  16. "show_counter_discount":""
  17. }}
  18.  
  19. SELECT products.* FROM `products`
  20. INNER JOIN `product_features` ON products.ID = product_features.product_id
  21. WHERE product_features.feature_id = '1' OR product_features.feature_id = '3'
  22.  
  23. SELECT id FROM table_name WHERE field_name REGEXP '"key_name":"([^"])key_word([^"])"';
  24. or
  25. SELECT id FROM table_name WHERE field_name RLIKE '"key_name":"[[:<:]]key_word[[:>:]]"';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement