Title: SQL to pull products from db
Last modified: July 10, 2020

---

# SQL to pull products from db

 *  Resolved [dl292](https://wordpress.org/support/users/dl292/)
 * (@dl292)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/sql-to-pull-products-from-db/)
 * I need to pull in all products from a specific category and display them on the
   page (using php/mySQL). Can someone share the code to achieve this?
    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Riaan K.](https://wordpress.org/support/users/riaanknoetze/)
 * (@riaanknoetze)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/sql-to-pull-products-from-db/#post-13106350)
 * Hi there,
 * Have you considered just using a dedicated WooCommerce shortcode instead of writing
   custom code? If you’re wondering, the shortcode required is described at [https://docs.woocommerce.com/document/woocommerce-shortcodes/](https://docs.woocommerce.com/document/woocommerce-shortcodes/)
 *  Thread Starter [dl292](https://wordpress.org/support/users/dl292/)
 * (@dl292)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/sql-to-pull-products-from-db/#post-13107902)
 * Excellent – works like a charm, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘SQL to pull products from db’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3640790)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [dl292](https://wordpress.org/support/users/dl292/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/sql-to-pull-products-from-db/#post-13107902)
 * Status: resolved