get_results()<\/strong> to return multiple rows of data<\/h2>\n\n\n\n<?php\n$allcustomers = $wpdb->get_results('SELECT customer_name, customer_id FROM laundry_customers WHERE status = 1');\n\nforeach ($allcustomers as $singlecustomer ) {\necho '<p>' .$singlecustomer->customer_name. '<\/p>';\necho '<p>' .$singlecustomer->customer_id. '<\/p>';}\n?><\/pre>\n","protected":false},"excerpt":{"rendered":"I just wrote this little tutorial cause I seem to always forget those methods. But they are curcial when it comes to plugin development ond plugin customization. Fortunately it isa pretty straight forward to retrieve and show data from the sql databsse in wordpress. Give it a go! WordPress defines a class called wpdb, which…<\/p>\n","protected":false},"author":1,"featured_media":465,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-3098","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein","entry","has-media"],"_links":{"self":[{"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/posts\/3098"}],"collection":[{"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/comments?post=3098"}],"version-history":[{"count":0,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/posts\/3098\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/media\/465"}],"wp:attachment":[{"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/media?parent=3098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/categories?post=3098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knowboard.de\/wp-json\/wp\/v2\/tags?post=3098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}