leonam-carlos

SQL Woocommerce Products (hacked)

Apr 19th, 2020
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.82 KB | None | 0 0
  1. SELECT
  2.      /** Post ID **/
  3.      p.id,
  4.      /** Product Code **/
  5.      /*mt.meta_value AS sku,*/
  6.      /** Product Stock **/
  7.      /* m.meta_value AS stock,  */
  8.      /** Item Title **/
  9.      p.post_title AS title,
  10.      /** Item Description **/
  11.      p.post_content AS description /*,*/
  12.      /** Item Price **/
  13.      /* pt.meta_value AS price ,*/
  14.      /** Item Weight **/
  15.      /* wt.meta_value AS weight */
  16. FROM
  17.      sf_posts p
  18. /*    
  19. INNER JOIN sf_postmeta m ON (
  20.      p.id = m.post_id
  21. )
  22. INNER JOIN sf_postmeta mt ON (
  23.      p.id = mt.post_id
  24. )
  25. INNER JOIN sf_postmeta pt ON (
  26.      p.id = pt.post_id
  27. )
  28. INNER JOIN sf_postmeta wt ON (
  29.      p.id = wt.post_id
  30. )
  31. */
  32. WHERE
  33.  p.post_type = 'product'
  34. /*AND
  35.  m.meta_key = '_stock'
  36. AND
  37.  mt.meta_key = '_sku'
  38. AND
  39.  pt.meta_key = '_price'
  40. AND
  41.  wt.meta_key = '_weight'
  42. */
Add Comment
Please, Sign In to add comment