Answers for "wordpress wpdb query"

PHP
0

wordpress execute query

global $wpdb;    
$result = $wpdb->get_results( "SELECT * FROM wp_usermeta WHERE meta_key = 'points' AND user_id = '1'");
print_r($result);
Posted by: Guest on April-16-2020
1

wordpress wpdb

<?php

if ( ! defined('ABSPATH') ) {
    /** Set up WordPress environment */
    require_once( dirname( __FILE__ ) . '/wp-load.php' );
}

global $wpdb;
$results = $wpdb->get_results( "SELECT * FROM table_bame", OBJECT );

print_r($results);
Posted by: Guest on July-01-2020

Browse Popular Code Answers by Language