{"id":3947,"date":"2020-03-17T20:28:20","date_gmt":"2020-03-18T03:28:20","guid":{"rendered":"https:\/\/codedcommerce.com\/product\/import-placeholder-for-188\/"},"modified":"2023-10-08T20:02:47","modified_gmt":"2023-10-09T03:02:47","slug":"run-manual-database-query","status":"publish","type":"woo-code","link":"https:\/\/codedcommerce.com\/woo\/run-manual-database-query\/","title":{"rendered":"Run manual database query"},"content":{"rendered":"\n<pre class=\"wp-block-code language-php\"><code>add_action( 'admin_notices', function() {\n\n\tglobal $wpdb;\n\n\t$result = $wpdb->get_row(\n\t\tsprintf(\n\t\t\t\"SELECT * FROM %s LIMIT 50\",\n\t\t\t$wpdb->prefix . 'options'\n\t\t), ARRAY_N\n\t);\n\n\tprintf(\n\t\t'&lt;div class=\"%s\">&lt;p>%s&lt;\/p>&lt;\/div>',\n\t\t'notice notice-success is-dismissible',\n\t\tprint_r( $result, true )\n\t);\n\n} );<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-3947","woo-code","type-woo-code","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/woo-code\/3947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/woo-code"}],"about":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/types\/woo-code"}],"wp:attachment":[{"href":"https:\/\/codedcommerce.com\/wp-json\/wp\/v2\/media?parent=3947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}