Support » Fixing WordPress » query a product list from mysql
4 years, 3 months ago
How can i query a product list from mysql and display the items?
Look into $wpdb
Then you can use the class to do a SQL query
$results = $wpdb->query(SELECT * FROM table_name WHERE blah blah bah);
Then you can return the object just like you would a normal MySQL query (as object and not array)
okay, I’m not too familiar with this. This is an example of what I want to do
they list the product categories then you can click on one and it lists the items in that category. I’ve made a new table in mysql database called plist and I uploaded the CSV file.
I don’t really know what to do from there