Skip to content

Instantly share code, notes, and snippets.

@lu911
Created August 19, 2014 11:31
Show Gist options
  • Save lu911/6ab232644472e39f52ae to your computer and use it in GitHub Desktop.
Save lu911/6ab232644472e39f52ae to your computer and use it in GitHub Desktop.
query
SELECT items.id AS items_id, items.created_at AS items_created_at, items.updated_at AS items_updated_at, items.origin_id AS items_origin_id, items.origin_category_id AS items_origin_category_id, items.origin_photo_url AS items_origin_photo_url, items.name AS items_name, items.price AS items_price, items.sale_price AS items_sale_price, items.description AS items_description, items.redirect_url AS items_redirect_url, items.view_count AS items_view_count, items.category_id AS items_category_id, items.mall_id AS items_mall_id
FROM items INNER JOIN categories ON categories.id = items.category_id
WHERE categories.id = 10000 OR categories.id = 10100 OR categories.id = 10200 OR categories.id = 10300 OR categories.id = 10400 OR categories.id = 10500 OR categories.id = 10501 OR categories.id = 10502 OR categories.id = 10503 OR categories.id = 10504 OR categories.id = 10505 OR categories.id = 10500 OR categories.id = 10600 OR categories.id = 10700 OR categories.id = 10701 OR categories.id = 10702 OR categories.id = 10703 OR categories.id = 10704 OR categories.id = 10705 OR categories.id = 10706 OR categories.id = 10707 OR categories.id = 10708 OR categories.id = 10700 OR categories.id = 10800 OR categories.id = 10801 OR categories.id = 10802 OR categories.id = 10803 OR categories.id = 10800 OR categories.id = 10900 ORDER BY items.price DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment